1 Answer
- Newest
- Most votes
- Most comments
1
Hi.
What you can do is to utilize DynamoDB streams and EventBridge. DynamoDB Stream -> EventBridge Pipes -> EventBridge Bus -> SQS -> Lambda
Template would look like this, not all part present
DynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: myTable
BillingMode: PAY_PER_REQUEST
StreamSpecification:
StreamViewType: NEW_IMAGE
.......
# Event Bus (Target)
MyBus:
Type: AWS::Events::EventBus
Properties:
Name: myBus
# EventBridge Pipe
Pipe:
Type: AWS::Pipes::Pipe
Properties:
Name: DynamoDB-to-eventbridge
Description: Pipe to connect DeviceInventoryTable Stream to EventBridge event bus
RoleArn: !GetAtt EventBridgePipeRole.Arn
Source: !Ref DynamoDBTableStreamArn
SourceParameters:
DynamoDBStreamParameters:
StartingPosition: LATEST
BatchSize: 1
Target: !GetAtt MyBus.Arn
TargetParameters:
EventBridgeEventBusParameters:
DetailType: MyDetailType
Source: MyApp
You then create an SQS queue and a Lambda function where the SQS queue is the target for EventBridge Rule.
You can check my blog post Building a Multi-region Serverless IoT system on community.aws in this post I use this technique to replicate IoT Devices cross-region.
Hope it helps!
Relevant content
- asked 6 months ago
- asked 12 days ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago