Skip to content

Instantly share code, notes, and snippets.

@heiwad
Created June 7, 2018 21:25
Show Gist options
  • Save heiwad/6f0df96e4977174caf878df946d5c80d to your computer and use it in GitHub Desktop.
Save heiwad/6f0df96e4977174caf878df946d5c80d to your computer and use it in GitHub Desktop.
Lambda function (python 2.7) to print back the parameters it receives.
import json
def lambda_handler(event, context):
print('Received event: ' + json.dumps(event, indent=2))
response = {
"statusCode":200,
"headers": { "Access-Control-Allow-Origin": " *", "Content-Type" : 'application/json' },
"body": json.dumps(event)
}
return response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment