Skip to content

Instantly share code, notes, and snippets.

@indreklasn
Created December 5, 2019 11:10
Show Gist options
  • Save indreklasn/e6ff28e71fd9b1e7a10ecc6edda5862c to your computer and use it in GitHub Desktop.
Save indreklasn/e6ff28e71fd9b1e7a10ecc6edda5862c to your computer and use it in GitHub Desktop.
exports.handler = (event, context, callback) => {
// "event" has information about the path, body, headers, etc. of the request
console.log('event', event)
// "context" has information about the lambda environment and user details
console.log('context', context)
// The "callback" ends the execution of the function and returns a response back to the caller
return callback(null, {
statusCode: 200,
body: JSON.stringify({
data: 'hello world'
})
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment