Session records are no longer needed 24 hours after creation.
Remove expired items automatically and eliminate an application-side deletion job.
Which feature is most appropriate?
Set a DynamoDB Time to Live attribute so expired items are removed by the service in the background.
Detailed explanation
S3 lifecycle rules apply to S3 objects and do not delete DynamoDB items.
S3 lifecycle rules apply to S3 objects and do not delete DynamoDB items.
DNS TTL controls name-resolution caching and has no relationship to DynamoDB retention.
DNS TTL controls name-resolution caching and has no relationship to DynamoDB retention.
Unneeded records continue to consume storage and increase maintenance work.
Unneeded records continue to consume storage and increase maintenance work.
TTL uses an expiration attribute and removes expired items asynchronously without a custom deletion loop.
TTL uses an expiration attribute and removes expired items asynchronously without a custom deletion loop.
Check official documentation
Compare the following points with the official documentation.
DynamoDB Time to Liveの公式説明を確認する。
What to confirm
データ保持期間とDynamoDB TTLを対応付けられる。
Key points
- DynamoDB TTL
- Expiration attribute
- Automatic deletion
Notes
- Environment: AWS公式DynamoDBドキュメントの確認
- Confirm current AWS pricing and service behavior in the official documentation.
Foundation review
Asynchronous expiry
TTL deletion is not an exact-time transaction, so applications should tolerate a delay after expiry.
Service scope
DynamoDB TTL applies to table items; S3 Lifecycle applies to S3 objects.