Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Pattern Submission - API GW to Kinesis to Lambda to DDB #1483

Merged
merged 5 commits into from
Jul 13, 2023
Merged

New Pattern Submission - API GW to Kinesis to Lambda to DDB #1483

merged 5 commits into from
Jul 13, 2023

Conversation

ravikirang28
Copy link

Description of changes:
This pattern explains how to deploy a SAM application with Amazon API Gateway, Amazon Kinesis Data Stream, AWS Lambda, and Amazon DynamoDB. When an HTTP POST request is made to the Amazon API Gateway endpoint, Gateway authorizes the request by checking Basic auth credentials and on valid credentials, request payload is sent to Amazon Kinesis Data Stream. This pattern is especially useful in cases of large payloads since Kinesis Data Stream can support upto 1MB payload size. AWS Lambda function consumes event from the Data Stream and inserts the event/payload into the Amazon DynamoDB table. Amazon Lambda is also configured with a Dead Letter Queue where events are sent when retries to process those messages are repeatedly failed. Diagram and more details are also documented in README file.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jbesw
Copy link
Contributor

jbesw commented Jul 7, 2023

This is missing the example-pattern.json metadata file. Please add so the pattern can be tested.

@ravikirang28
Copy link
Author

Missing example-pattern.json metadata file is added now.

- Retrieve the username and password from Secrets Manager in AWS Console.
- Invoke the endpoint from Postman using some json payload and verify the payload saved in DynamoDB.

Example POST Request: https://{RestApiEndpoint}.execute-api.us-east-1.amazonaws.com/submit/{streamName}/{eventId}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not obvious what users need to have for {streamName} and {eventId}
Please provide a full example that makes this easier to use.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@julianwood Updated the docs now. Hopefully, it's clear now. Please take a look and let me know for any further comments.

@julianwood julianwood merged commit 9273614 into aws-samples:main Jul 13, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants