DynamoDB table 具有 TTL 并触发 Kinesis Firehose
DynamoDB table having TTL and triggers Kinesis Firehose
在我的 DynamoDB table 中,Kinesis Firehose 被触发,只要某些记录是 added/updated,它就会将我的数据转储到 S3。我的 DynamoDB table 也启用了 TTL。
删除某条记录时是否也会触发?
当项目过期时,届时是否会触发 Kinesis Firehose,S3 端会发生什么情况?
我的理解是,DynamoDB 发送到 Kinesis Data Streams 的数据格式与它发送到常规 DynamoDB 流的数据基本相同,因此,我希望行为是相同的。
根据 Kinesis Data Streams integration docs(强调我的):
Amazon Kinesis Data Streams for Amazon DynamoDB operates asynchronously, so there is no performance impact on a table if a stream is enabled. Whenever items are created, updated, or deleted in the table, DynamoDB sends a data record to Kinesis. The record contains information about a data modification to a single item in a DynamoDB table. Specifically, a data record contains the primary key attribute of the item that was modified, together with the "before" and "after" images of the modified item.
这基本上也是常规 DynamoDB 流所做的,关于 TTL-删除 docs for that 说:
You can back up, or otherwise process, items that are deleted by Time to Live (TTL) by enabling Amazon DynamoDB Streams on the table and processing the streams records of the expired items.
The streams record contains a user identity field Records[].userIdentity.
Items that are deleted by the Time to Live process after expiration have the following fields:
Records[<index>].userIdentity.type
"Service"
Records[<index>].userIdentity.principalId
"dynamodb.amazonaws.com"
tl;dr:是的,TTL 删除也应该出现在流中,并且将像任何常规删除一样由 Firehose 处理。
在我的 DynamoDB table 中,Kinesis Firehose 被触发,只要某些记录是 added/updated,它就会将我的数据转储到 S3。我的 DynamoDB table 也启用了 TTL。
删除某条记录时是否也会触发?
当项目过期时,届时是否会触发 Kinesis Firehose,S3 端会发生什么情况?
我的理解是,DynamoDB 发送到 Kinesis Data Streams 的数据格式与它发送到常规 DynamoDB 流的数据基本相同,因此,我希望行为是相同的。
根据 Kinesis Data Streams integration docs(强调我的):
Amazon Kinesis Data Streams for Amazon DynamoDB operates asynchronously, so there is no performance impact on a table if a stream is enabled. Whenever items are created, updated, or deleted in the table, DynamoDB sends a data record to Kinesis. The record contains information about a data modification to a single item in a DynamoDB table. Specifically, a data record contains the primary key attribute of the item that was modified, together with the "before" and "after" images of the modified item.
这基本上也是常规 DynamoDB 流所做的,关于 TTL-删除 docs for that 说:
You can back up, or otherwise process, items that are deleted by Time to Live (TTL) by enabling Amazon DynamoDB Streams on the table and processing the streams records of the expired items.
The streams record contains a user identity field Records[].userIdentity.
Items that are deleted by the Time to Live process after expiration have the following fields:
Records[<index>].userIdentity.type
"Service"
Records[<index>].userIdentity.principalId
"dynamodb.amazonaws.com"
tl;dr:是的,TTL 删除也应该出现在流中,并且将像任何常规删除一样由 Firehose 处理。