Amazon API Gateway HTTP API to AWS Lambda to RDS Proxy

HTTP API → AWS Lambda → RDS proxy instance → Amazon Aurora

Create an HTTP API endpoint that calls a Lambda function to RDS Proxy.

Sets up an API Gateway HTTP API endpoint with an AWS Lambda function as an integration. The Lambda function integrates with RDS Proxy to query the RDS Aurora (MySQL) relational database.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Launch Stack

Clone repo

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

Deploy

sam deploy --guided


Testing

See testing in the README.md file in the repo

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Additional resources

Created by:

Pankaj Agrawal

Pankaj Agrawal

Pankaj is a Solutions Architect at AWS, where he works with different customers across Nordics, helping them to make best use of AWS services and accelerate their journey to cloud. In his spare time, he enjoys running into the woods and loves to learn new technical skills. He is quite passionate about DevOps and Serverless technologies.