Amazon API Gateway HTTP API with AWS Lambda integration

Amazon API Gateway HTTP API → AWS Lambda

This pattern creates an Amazon API Gateway HTTP API and a sample Lambda function returning a simple 'Hello World' response

This pattern creates an Amazon API Gateway HTTP API (v2) that integrates with an AWS Lambda function by using AWS Cloud Development Kit (AWS CDK).
The solution works as follow:
1. CDK will provision an Amazon API Gateway HTTP API and a sample Lambda function.
2. It will integrate the Lambda function to the HTTP API using the route '/'
3. Finally, it will return the HTTP API URL in the console. (So you can test the deployment)

< 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-ts-cdk

Deploy

Deploy the stack: <code>cdk deploy</code> or <code>npm run deploy</code>


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk destroy.

Created by:

Philippe Wanner

Philippe Wanner

Philippe is a Senior Specialist Solutions Architect at Amazon Web Services based in Zurich, Switzerland. His role is to spread the migration and modernization best practices for large organisations.

Follow on LinkedIn