Amazon API Gateway HTTP API to AWS Lambda

API Gateway HTTP API → AWS Lambda

Creates an Amazon API Gateway HTTP API and an AWS Lambda function

This pattern deploys an Amazon API Gateway HTTP API with a default route and basic CORS configuration.
The default route is integrated with an AWS Lambda function written in Python.
The function logs the incoming API event (v2) and context object to an Amazon CloudWatch Logs log group and returns basic information about the event to the caller.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/apigw-http-api-lambda-terraform

Deploy

terraform apply


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

terraform destroy

Created by:

Carlos Bauer

I am Technical Account Manager at AWS