Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exports.handler = (event, context, callback) => {
- // If we set the lambda as a proxy in the lambda config,
- // it will have the full request object in event parameter instead of the data needed
- // The context provide details of your Lambda function's execution. OPTIONAL
- const response = {
- headers: {'Control-Access-Allow-Origin': '*'},
- body: JSON.stringify({message: 'I\'m a lambda!'})
- }
- // The callback is responsible to invocation until the event loop is empty.
- // As a lambda proxy we have to return the incoming request
- callback(null, response)
- }
Add Comment
Please, Sign In to add comment