Skip to content

Instantly share code, notes, and snippets.

@PandaWhoCodes
Last active June 23, 2017 22:28
Show Gist options
  • Save PandaWhoCodes/f2049b2b38156e3ca862354c3163efc3 to your computer and use it in GitHub Desktop.
Save PandaWhoCodes/f2049b2b38156e3ca862354c3163efc3 to your computer and use it in GitHub Desktop.
lambda handler for get operation
def lambda_handler(event, context):
return respond(False,event)
'''
OUTPUT:
{"body-json": {}, "params": {"path": {}, "querystring": {"query": "testing"}, "header": {"Accept": "*/*", "Accept-Encoding": "gzip, deflate", "CloudFront-Forwarded-Proto": "https", "CloudFront-Is-Desktop-Viewer": "true", "CloudFront-Is-Mobile-Viewer": "false", "CloudFront-Is-SmartTV-Viewer": "false", "CloudFront-Is-Tablet-Viewer": "false", "CloudFront-Viewer-Country": "IN", "Host": "id5zrbbcg9.execute-api.us-east-1.amazonaws.com", "User-Agent": "python-requests/2.13.0", "Via": "1.1 16cfccb6d55cfe3498d5cf79893ff28d.cloudfront.net (CloudFront)", "X-Amz-Cf-Id": "U5lLN85-DYbsRICgsZjP-66xS-Lhlzoybl4iRimdOqz7zoEoCv2U8g==", "X-Amzn-Trace-Id": "Root=1-594d92aa-2fd6711137f905d51f526446", "X-Forwarded-For": "210.16.84.46, 54.239.160.65", "X-Forwarded-Port": "443", "X-Forwarded-Proto": "https"}}, "stage-variables": {}, "context": {"account-id": "", "api-id": "id5zrbbcg9", "api-key": "", "authorizer-principal-id": "", "caller": "", "cognito-authentication-provider": "", "cognito-authentication-type": "", "cognito-identity-id": "", "cognito-identity-pool-id": "", "http-method": "GET", "stage": "prod", "source-ip": "210.16.84.46", "user": "", "user-agent": "python-requests/2.13.0", "user-arn": "", "request-id": "4338149e-5861-11e7-a793-811b1865ad0d", "resource-id": "nez6gmdqz6", "resource-path": "/"}}
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment