DVA-C02 Development with AWS Services Practice Question
An application stores session data in DynamoDB and must expire sessions automatically after a timestamp. Which feature should be used?
⚠ Common exam trap
A common mix-up: candidates confuse DynamoDB TTL with DynamoDB Streams or Lambda triggers for cleanup, but TTL is the native, serverless mechanism that requires no custom code for expiration.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
DynamoDB Time to Live
DynamoDB Time to Live (TTL) allows you to define a timestamp attribute per item, and DynamoDB automatically deletes items once that timestamp is reached. This is the ideal feature for expiring session data without requiring custom scan-and-delete logic, reducing cost and operational overhead.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
DynamoDB global tables
Why it's wrong here
DynamoDB global tables provide multi-region replication for high availability and disaster recovery, allowing applications to access data with low latency from different geographical locations. However, this feature focuses on data distribution and redundancy, not on automatically expiring individual items within a table. It does not offer any built-in mechanism to delete session data after a specified duration.
- ✗
DynamoDB transactions
Why it's wrong here
DynamoDB transactions ensure atomicity, consistency, isolation, and durability (ACID) for multiple read or write operations, allowing developers to group several actions into a single, all-or-nothing unit. While critical for maintaining data integrity across related items, transactions are designed for concurrent data modification and integrity, not for the automatic, time-based deletion of items from a table. They do not provide a solution for expiring session data.
- ✗
DynamoDB export to S3
Why it's wrong here
DynamoDB export to S3 allows users to perform a point-in-time export of an entire table's data to an Amazon S3 bucket. This feature is primarily used for analytical processing, data archiving, or creating backups for disaster recovery purposes. It is a data movement and storage solution, not an in-place data lifecycle management feature that automatically removes individual items from the live DynamoDB table based on an expiration criterion.
- ✓
DynamoDB Time to Live
Why this is correct
DynamoDB Time to Live (TTL) is the correct solution as it enables automatic, cost-effective deletion of items from a table after a specified timestamp. By designating a numeric attribute (e.g., `expirationTime`) as the TTL attribute, DynamoDB asynchronously removes items once their timestamp value is in the past. This directly fulfills the requirement for expiring session data, reducing storage costs and simplifying application logic by offloading cleanup tasks.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DVA-C02 question from scratch — 724 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.