Reputation: 21
I am trying out aws lambda for nodejs, starting with the example, i can't seem to be able to resolve index.handler. i've make sure index.js is in the root directory. appreciate your help.
(EDIT) i'm using the example code from AWS website
const https = require('https')
let url = "https://docs.aws.amazon.com/lambda/latest/dg/welcome.html"
exports.handler = async function(event) {
const promise = new Promise(function(resolve, reject) {
https.get(url, (res) => {
resolve(res.statusCode)
}).on('error', (e) => {
reject(Error(e))
})
})
return promise
}
index.js and test execution error
Upvotes: 1
Views: 741
Reputation: 21
my error was simply because after saving the edit in the online editor, i need to "Deploy" the save. See deploy button
Upvotes: 1