Amazon API Gateway to AWS Lambda to Amazon DocumentDB

Amazon API Gateway → AWS Lambda → Amazon DocumentDB

Create an Amazon API Gateway HTTP API to invoke a Lambda function to read and write to DocumentDB.

This AWS CDK stack deploys an API Gateway HTTP API that integrates with a Lambda function and a DocumentDB cluster. The Lambda function is configured to use a customer VPC to connect to the DocumentDB cluster. The Lambda function implements CRUD operations on the database.

< 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-lambda-documentdb-cdk

Deploy

cdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk destroy.

Created by:

Joachim Aumann

Joachim Aumann

Sr. Solutions Architect working at AWS

Follow on LinkedIn