Created
January 6, 2019 07:04
-
-
Save infoankitp/2e258545c0d81a3822bc3f91910d9a04 to your computer and use it in GitHub Desktop.
This file contains 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( "Event : " , event) | |
#This will print the event passed to lambda_handler in | |
#Cloudwatch Logs | |
print( "Context : " , context) | |
#This will print the context passed to lambda_handler in | |
#Cloudwatch #Logs | |
name = "" | |
if 'queryStringParameters' in event: | |
if event['queryStringParameters'] is not None: | |
if 'name' in event['queryStringParameters'] : | |
name = event['queryStringParameters']['name'] + " " | |
return { | |
'statusCode': 200, | |
'body': json.dumps('Hello {}from Lambda!'.format(name)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment