1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
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!
관련 콘텐츠
- AWS 공식업데이트됨 2년 전
- AWS 공식업데이트됨 일 년 전
- AWS 공식업데이트됨 일 년 전