|
1 | 1 | # AWS DynamoDB to EventBridge Scheduler via AWS Lambda function
|
2 | 2 |
|
3 |
| -This pattern demonstrates a sample to delay processing of data or workflow using an Amazon EventBridge Scheduler. A schedule that invokes a target one-time or at regular intervals defined by a cron or rate expression. |
| 3 | +This pattern demonstrates a sample to delay Amazon DynamoDB Stream processing using Amazon EventBridge Scheduler. EventBridge Scheduler invokes a target one-time or at regular intervals defined by a cron or rate expression. |
4 | 4 |
|
5 |
| -In this sample, Amazon Apigateway receives a request from end users that has schedule time and event category provided in the body. The data is stored in Amazon DynamoDB table. |
| 5 | +Amazon DynamoDB streams are used to deliver event payload to the handlers in near real time. This pattern will help customers with usecases such as process stream events at a particular time window, as well as triggring one target AWS service from EventBridge Scheduler. |
6 | 6 |
|
7 |
| -Amazon DynamoDB table has stream enabled and it publisehs to a Lambda function. Lambda function then calls Amzon EventBridge Scheduler and selects the groups as per the request body. |
8 |
| - |
9 |
| -EventBridge Scheduler provides a universal target parameter that you can use to create customized triggers that targets more than 270 AWS service and over 6,000 API operation on a schedule. In this example, we are showing integration with two targets, i.e. AWS Lamdba Function and Amazon SQS queue. |
10 |
| - |
11 |
| -Learn more about this pattern at Serverless Land Patterns: << Add the live URL here >> |
| 7 | +Learn more about this pattern at Serverless Land Patterns: [Delayed processing of Dynamodb stream with EventBridge Scheduler](https://serverlessland.com/patterns/apigw-dynamodb-lambda-scheduler-sqs-cdk) |
12 | 8 |
|
13 | 9 | Important: this application uses various AWS services and there are costs associated with these services after the Free Tier usage - please see the [AWS Pricing page](https://aws.amazon.com/pricing/) for details. You are responsible for any AWS costs incurred. No warranty is implied in this example.
|
14 | 10 |
|
@@ -43,17 +39,21 @@ Important: this application uses various AWS services and there are costs associ
|
43 | 39 | cdk deploy
|
44 | 40 | ```
|
45 | 41 |
|
| 42 | +## Architecture |
| 43 | + |
| 44 | + |
| 45 | + |
46 | 46 | ## How it works
|
47 | 47 |
|
48 |
| -This pattern is designed to help connect producers that are submitting messages into SNS with EventBridge as a way to deliver those same events in a more configuration driven and scalable way. It also helps reduce load and needless code downstream by leveraging AWS EventBridge Pipes to both filter and transform the data from the producer before attaching to an EventBus for further consumption. |
| 48 | +In this sample, Amazon Apigateway receives a request from end-users that has a schedule time and event category provided in the request body. The data is stored in Amazon DynamoDB table. Amazon DynamoDB table has stream enabled and it publishes event to a Lambda function. Lambda function invokes Amazon EventBridge Scheduler and selects the groups provided the request body. EventBridge Scheduler provides a universal target parameter that you can use to create customized triggers that targets more than 270 AWS service and over 6,000 API operation on a schedule. In this example, we are showing integration with two targets, i.e. AWS Lamdba Function, and Amazon SQS queue. |
49 | 49 |
|
50 | 50 | Once the pattern is deployed to AWS, you will have the following resources created with the described capabilities
|
51 | 51 |
|
52 | 52 | - An edge optimized Amazon API Gateway endpoint that will receive user request
|
53 | 53 | - A Post method to add a new record in Amazon DynamoDB.
|
54 | 54 | - A Get method sent with an id to retrive the scheduler.
|
55 | 55 | - DynamoDB table with DynamoDB Stream enabled.
|
56 |
| -- Two Amazon Lambda functions |
| 56 | +- Amazon Lambda functions |
57 | 57 | - Producer Lambda function that listens to DynamoDB stream and calls Amazon EventBridge Scheduler
|
58 | 58 | - Consumer Lambda function acts as a target and listens to EventBridge Scheduler. It performs given actions and deletes the schedule.
|
59 | 59 | - An EventBridge Schedule groups in which Producer Lambda function can categories an event.
|
|
0 commit comments