-
Notifications
You must be signed in to change notification settings - Fork 979
Avnishamzn/Saptob feature ddbstream lambda sfn cdk ts #2743
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
base: main
Are you sure you want to change the base?
Avnishamzn/Saptob feature ddbstream lambda sfn cdk ts #2743
Conversation
DDB stream event trigger constructs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @avnishamzn, TY for your PR. I made a few requests for changes. Please review & accept or update. Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be removed
|
||
# Amazon DynamoDB Stream to AWS Step Functions Trigger | ||
|
||
This Pattern demonstrates how to automatically trigger AWS Step Functions workflows in response to changes in DynamoDB tables. `DynamoWorkflowTrigger` lets you connect DynamoDB and Step Functions by allowing you to define event handlers that monitor specific changes in your DynamoDB tables and trigger workflows in response. It leverages Lambda functions to evaluate conditions and start Step Functions state machines with inputs derived from the DynamoDB events. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Pattern demonstrates how to automatically trigger AWS Step Functions workflows in response to changes in DynamoDB tables. `DynamoWorkflowTrigger` lets you connect DynamoDB and Step Functions by allowing you to define event handlers that monitor specific changes in your DynamoDB tables and trigger workflows in response. It leverages Lambda functions to evaluate conditions and start Step Functions state machines with inputs derived from the DynamoDB events. | |
This Pattern demonstrates how to automatically trigger AWS Step Functions workflows in response to changes in DynamoDB tables. The CDK construct `DynamoWorkflowTrigger` lets you connect DynamoDB and Step Functions by allowing you to define event handlers that monitor specific changes in your DynamoDB tables and trigger workflows in response. It leverages Lambda functions to evaluate conditions and start Step Functions state machines with inputs derived from the DynamoDB events. |
|
||
This Pattern demonstrates how to automatically trigger AWS Step Functions workflows in response to changes in DynamoDB tables. `DynamoWorkflowTrigger` lets you connect DynamoDB and Step Functions by allowing you to define event handlers that monitor specific changes in your DynamoDB tables and trigger workflows in response. It leverages Lambda functions to evaluate conditions and start Step Functions state machines with inputs derived from the DynamoDB events. | ||
|
||
Learn more about this pattern at Serverless Land Patterns: https://serverlessland.com/patterns/{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Learn more about this pattern at Serverless Land Patterns: https://serverlessland.com/patterns/{} | |
Learn more about this pattern at Serverless Land Patterns: [https://serverlessland.com/patterns/ddbstream-lambda-sfn-cdk-ts](https://serverlessland.com/patterns/ddbstream-lambda-sfn-cdk-ts) |
``` | ||
cd ddbstream-lambda-sfn-cdk-ts | ||
``` | ||
3. (Optional) Update the environment settings in `app.ts` if you know exactly what Account and Region you want to deploy the stack to. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed/replaced with implementation in ./app.ts (see review comment there)
|
||
1. From the command line, use the following in the source folder | ||
```bash | ||
npx cdk destroy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npx cdk destroy | |
cdk destroy |
code: Code.fromAsset(path.join(__dirname, '../lambda')), | ||
handler: "index.handler", | ||
runtime: Runtime.NODEJS_20_X, | ||
memorySize: 2048, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think default (128MB) is suitable here so can be removed.
Otherwise pls check. I think 2048MB is oversized.
- For complex filtering, use Lambda event source filters | ||
|
||
|
||
Here's a suggested testing section for the README: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be removed
"scripts": { | ||
"build": "tsc", | ||
"watch": "tsc -w", | ||
"test": "jest", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be removed
@avnishamzn please add an example-pattern.json file to your repository. Use the example json from here |
Issue #, if available:
Description of changes:
A CDK construct to automatically trigger AWS Step Functions workflows in response to changes in DynamoDB tables. The
DynamoWorkflowTrigger
construct bridges DynamoDB streams and Step Functions by allowing you to define event handlers that monitor specific changes in your DynamoDB tables and trigger workflows in response. It leverages Lambda functions to evaluate conditions and start Step Functions state machines with inputs derived from the DynamoDB events.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.