Amazon API Gateway to AWS Lambda, Amazon DynamoDB, Amazon Kinesis, AWS Lambda integration

API Gateway → AWS Lambda → DynamoDB → Kinesis

Create a API to trigger Lambda, save to DynamoDB, and emit message to Kinesis.

This sample project demonstrates how to use Amazon API Gateway, AWS Lambda, Amazon DynamoDB and Kinesis together. When an HTTP POST request is made to the Amazon API Gateway endpoint, the AWS Lambda function is invoked and inserts an item into the Amazon DynamoDB table, then an event will be pushed into Kinesis and trigger a Lambda function.

< 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-lambda-dynamodb-kinesis-lambda

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

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"

Created by:

Thi Nguyen

Thi Nguyen

Solutions Architect @ AWS

Follow on LinkedIn

Vijay Konade

Vijay Konade

Cloud Support Eng @ AWS

Follow on LinkedIn