Podcast
Questions and Answers
A DynamoDB table has TTL enabled. An item expires at 10:00 AM on January 1, 2024. When is the item guaranteed to be deleted?
A DynamoDB table has TTL enabled. An item expires at 10:00 AM on January 1, 2024. When is the item guaranteed to be deleted?
- Any time between 10:00 AM on January 1, 2024 and 10:00 AM on January 3, 2024 (correct)
- 10:00 AM on January 3, 2024
- 10:00 AM on January 2, 2024
- DynamoDB Streams will record the deletion at 10:00 AM on January 1, 2024
You need to purge data older than 30 days from a DynamoDB table. Which approach is the most cost-effective?
You need to purge data older than 30 days from a DynamoDB table. Which approach is the most cost-effective?
- Scan the table daily, identifying and deleting items older than 30 days using the DeleteItem operation.
- Run a daily batch job that uses a parallel scan to identify and archive items older than 30 days to S3, then delete them.
- Implement a Lambda function triggered by DynamoDB Streams to delete items older than 30 days.
- Enable TTL on the table with a TTL attribute representing the expiration timestamp, set to 30 days in the past for old records. (correct)
An item in a DynamoDB table with TTL enabled is set to expire. What happens if the item is updated after its expiration time but before it is deleted?
An item in a DynamoDB table with TTL enabled is set to expire. What happens if the item is updated after its expiration time but before it is deleted?
- The item will be updated, but the TTL expiration timestamp will reset to the current time.
- The update will be rejected as the item is marked for deletion.
- The item will be updated, and the deletion will still occur based on the original expiration timestamp. (correct)
- The item will be updated, and the new values will be deleted according to the original expiration timestamp.
A developer is implementing TTL on a DynamoDB table. Which data type is suitable for storing the expiration timestamp?
A developer is implementing TTL on a DynamoDB table. Which data type is suitable for storing the expiration timestamp?
You have enabled TTL on your DynamoDB table and want to track when items are deleted. How can you achieve this?
You have enabled TTL on your DynamoDB table and want to track when items are deleted. How can you achieve this?
Flashcards
DynamoDB TTL
DynamoDB TTL
A feature to automatically delete items from a DynamoDB table after a set time.
TTL Deletion Delay
TTL Deletion Delay
Items are deleted ~48 hours after their expiration date.
TTL Cost Impact
TTL Cost Impact
Using TTL to delete items does not consume write throughput capacity.
TTL Timestamp Format
TTL Timestamp Format
Signup and view all the flashcards
TTL and DynamoDB Streams
TTL and DynamoDB Streams
Signup and view all the flashcards
Study Notes
- Time To Live (TTL) allows automatic deletion of items from a table after a defined age.
- Items are deleted approximately 48 hours after their expiration date.
- TTL deletions do not consume write throughput, making it a cost-effective cleanup method.
- Items pending deletion via TTL can still be updated.
- The expiration timestamp should be in Unix Epoch format.
- Deleted items appear in DynamoDB streams as service deletions.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
DynamoDB Time To Live (TTL) enables automatic item deletion after a specified duration. Items are typically removed about 48 hours post-expiration. TTL deletions do not use write throughput and updating items resets their expiration.