AMAZON DynamoDB(5)DynamoDB Stream
DynamoDB Stream + Lambda = Database Trigger
DynamoDB Stream will keep the messages for 24 hours. Only one record will be in the stream. Stream will follow the events time line order.
Enable streaming, for example
In overview of your DynamoDB console, there is stream details, Stream enabled, View Type: New and Old Image. Latest stream ARN
There are 4 types for View: Keys only, New Image, Old Image, New and Old Image. In our system, I think previous developer choose “New and old images”. That is expensive.
DynamoDB Update Operation
https://github.com/4ossiblellc/dynamodb-update-expression
No more than 2 processes at most should be reading from the same Streams shard at the same time. Having more than 2 readers per shard may result in throttling." I plan to do it as follow: streams---> lambda ---> SNS
It more than 2 lambda are interested in the streams.
References:
https://blog.youkuaiyun.com/hongchangfirst/article/details/47782247
https://www.youkuaiyun.com/article/1970-01-01/2825392
https://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/Streams.html
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html
https://github.com/4ossiblellc/dynamodb-update-expression
DynamoDB Stream + Lambda = Database Trigger
DynamoDB Stream will keep the messages for 24 hours. Only one record will be in the stream. Stream will follow the events time line order.
Enable streaming, for example
In overview of your DynamoDB console, there is stream details, Stream enabled, View Type: New and Old Image. Latest stream ARN
There are 4 types for View: Keys only, New Image, Old Image, New and Old Image. In our system, I think previous developer choose “New and old images”. That is expensive.
DynamoDB Update Operation
https://github.com/4ossiblellc/dynamodb-update-expression
No more than 2 processes at most should be reading from the same Streams shard at the same time. Having more than 2 readers per shard may result in throttling." I plan to do it as follow: streams---> lambda ---> SNS
It more than 2 lambda are interested in the streams.
References:
https://blog.youkuaiyun.com/hongchangfirst/article/details/47782247
https://www.youkuaiyun.com/article/1970-01-01/2825392
https://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/Streams.html
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html
https://github.com/4ossiblellc/dynamodb-update-expression
本文探讨了Amazon DynamoDB的流功能与Lambda结合使用作为数据库触发器的应用。详细介绍了DynamoDB流如何保留消息24小时,以及流中记录遵循事件时间线顺序的特性。此外,还讨论了四种视图类型:Keysonly、NewImage、OldImage和NewandOldImage,并分析了选择‘NewandOldImages’可能带来的成本问题。文中提到了DynamoDB更新操作及表达式的使用,以及如何避免同一流分片上的读取器过多导致的限流。
1861

被折叠的 条评论
为什么被折叠?



