Amazon API Gateway to AWS Lambda using OpenAPI

Amazon API Gateway → AWS Lambda → Amazon DynamoDB

Create a Lambda backed REST API using OpenAPI specification, with Lambda Powertools

This Terraform application deploys a Lambda backed Amazon API Gateway REST API using OpenAPI specification. OpenAPI specification YAML is included in the project which defines CRUD endpoints and their Lambda integrations. In addition, as a best practice Lambda Powertools have been incorporated as a layer which provides a structured logging mechanism via Cloudwatch Logs and enchanced end-to-end tracing of the incoming requests via AWS X-Ray.

< 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-openapi-lambda-dynamodb-xray-terraform/infra

Deploy

terraform -chdir=infra initterraform -chdir=infra apply


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

terraform -chdir=infra destroy

Created by:

Damodar Shenvi Wagle

Damodar Shenvi Wagle

Damodar Shenvi Wagle is a Senior Cloud Application Architect at AWS Professional Services.

Follow on LinkedIn