AMAZON DynamoDB(5)DynamoDB Stream

本文探讨了Amazon DynamoDB的流功能与Lambda结合使用作为数据库触发器的应用。详细介绍了DynamoDB流如何保留消息24小时,以及流中记录遵循事件时间线顺序的特性。此外,还讨论了四种视图类型:Keysonly、NewImage、OldImage和NewandOldImage,并分析了选择‘NewandOldImages’可能带来的成本问题。文中提到了DynamoDB更新操作及表达式的使用,以及如何避免同一流分片上的读取器过多导致的限流。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值