Created
June 7, 2018 21:25
-
-
Save heiwad/6f0df96e4977174caf878df946d5c80d to your computer and use it in GitHub Desktop.
Lambda function (python 2.7) to print back the parameters it receives.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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