AWS Certified Developer – Associate (DVA-C02) — Question 170

A mobile app stores blog posts in an Amazon DynamoDB table. Millions of posts are added every day, and each post represents a single item in the table. The mobile app requires only recent posts. Any post that is older than 48 hours can be removed.

What is the MOST cost-effective way to delete posts that are older than 48 hours?

Answer options

Correct answer: D

Explanation

The correct answer is D because configuring a TTL (Time to Live) directly on the DynamoDB table allows automatic deletion of items after the specified time, which is the most efficient and cost-effective method. The other options involve manual processes or additional resources like EC2 or ECS, which would incur extra costs and management overhead.