Question 131 of 1,616
Development with AWS ServiceseasyMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

This DVA-C02 practice question tests your understanding of development with aws services. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. A key principle to apply: dynamoDB TTL automatically deletes items based on a timestamp attribute.. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A developer is building a serverless application using AWS Lambda and Amazon DynamoDB. The application needs to store and retrieve session data. The session data has a TTL of 30 minutes. Which DynamoDB feature should the developer use to automatically delete expired items?

Question 1easymultiple choice
Full question →

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

Use DynamoDB Time to Live (TTL) to set an expiry time attribute that DynamoDB automatically deletes when the TTL is reached.

DynamoDB Time to Live (TTL) is the correct feature because it allows you to define a per-item timestamp attribute. When that timestamp is reached, DynamoDB automatically deletes the item without any additional cost or custom code. This directly meets the requirement to automatically delete expired session data after 30 minutes.

Key principle: DynamoDB TTL automatically deletes items based on a timestamp attribute.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use DynamoDB Streams to capture expired items and trigger a Lambda function for deletion.

    Why it's wrong here

    DynamoDB Streams capture item-level changes but do not automatically delete items. You would need additional Lambda logic to delete expired items, which is more complex and less efficient than using TTL.

  • Use DynamoDB Time to Live (TTL) to set an expiry time attribute that DynamoDB automatically deletes when the TTL is reached.

    Why this is correct

    DynamoDB TTL automatically deletes items after the specified expiry timestamp without any additional cost or custom code. This is the best option for automatic expiration of session data.

    Related concept

    DynamoDB TTL automatically deletes items based on a timestamp attribute.

  • Use DynamoDB Global Tables to replicate data to another region and then set a TTL on the replica.

    Why it's wrong here

    Global Tables are for multi-region replication, not for automatic deletion. While TTL can be set on replicas, the primary purpose is replication, and using Global Tables solely for expiration is overengineered and costly.

  • Use DynamoDB Accelerator (DAX) to cache the data and expire it based on a cache TTL.

    Why it's wrong here

    DAX is an in-memory cache that can have a TTL for cache entries, but it does not delete items from the underlying DynamoDB table. The items would still exist in DynamoDB indefinitely.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may think DynamoDB Streams can be used to detect expired items, but TTL deletions do not generate stream events, so a custom deletion mechanism would require a separate scan or query, which is inefficient and not automatic.

Detailed technical explanation

How to think about this question

DynamoDB TTL works by checking the attribute specified as the TTL field (typically a Unix epoch timestamp in seconds). When the current time exceeds that value, DynamoDB marks the item for deletion, which typically occurs within 48 hours but often much sooner (within minutes for most workloads). The deletion is background and does not consume write capacity units, making it cost-effective for session management.

KKey Concepts to Remember

  • DynamoDB TTL automatically deletes items based on a timestamp attribute.
  • The TTL attribute value must be a Unix epoch time in seconds.
  • TTL deletions are eventually consistent and incur no additional cost.
  • TTL is ideal for managing data with a defined lifespan, like session data or logs.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

DynamoDB TTL automatically deletes items based on a timestamp attribute.

Real-world example

How this comes up in practice

A startup's cloud architect reviews their monthly bill and notices costs are higher than expected for a long-running batch job. Switching from on-demand instances to Reserved Instances — or using Spot/Preemptible VMs — can reduce compute costs by up to 72 %. Questions like this test whether you understand the tradeoffs between commitment, flexibility, and cost across cloud pricing models.

What to study next

Got this wrong? Here's your next step.

Review dynamoDB TTL automatically deletes items based on a timestamp attribute., then practise related DVA-C02 questions on the same topic to reinforce the concept.

Related practice questions

Related DVA-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DVA-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this DVA-C02 question test?

Development with AWS Services — This question tests Development with AWS Services — DynamoDB TTL automatically deletes items based on a timestamp attribute..

What is the correct answer to this question?

The correct answer is: Use DynamoDB Time to Live (TTL) to set an expiry time attribute that DynamoDB automatically deletes when the TTL is reached. — DynamoDB Time to Live (TTL) is the correct feature because it allows you to define a per-item timestamp attribute. When that timestamp is reached, DynamoDB automatically deletes the item without any additional cost or custom code. This directly meets the requirement to automatically delete expired session data after 30 minutes.

What should I do if I get this DVA-C02 question wrong?

Review dynamoDB TTL automatically deletes items based on a timestamp attribute., then practise related DVA-C02 questions on the same topic to reinforce the concept.

What is the key concept behind this question?

DynamoDB TTL automatically deletes items based on a timestamp attribute.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.