Skip to content

Instantly share code, notes, and snippets.

Last active May 12, 2023 14:44
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
AWS Lambda: Python Hello World HTTP API
# This file is your Lambda function
import json
def mirror_query_strings(event, context):
body = {
"queryStrings": event['queryStringParameters']
return {
"statusCode": 200,
"body": json.dumps(body)
# This file will generate an API endpoint for your handler,
# using serverless (see
# For full config options, check the docs:
service: hello-world-functions
name: aws
runtime: python3.6
region: eu-central-1
handler: handler.mirror_query_strings
- http:
path: helloworld/mirror_query_strings
method: get
cors: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment