DVA-C02 Development with AWS Services Practice Question
A developer is using Amazon S3 to store application logs. The logs are generated every hour and must be retained for 90 days. After 90 days, the logs should be deleted automatically. Which S3 lifecycle policy should the developer configure?
⚠ Common exam trap
The trap here is that candidates often overcomplicate the solution by adding unnecessary transitions (like Option D) or confuse 'transition' with 'expiration', thinking moving to Glacier after 90 days automatically deletes the data, which it does not.
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
✓
Expire objects after 90 days.
The requirement is to delete logs after 90 days, and the S3 lifecycle 'Expire' action permanently removes objects once they reach the specified age. No transitions are needed since the logs are not required to be stored in a different storage class before deletion.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Expire objects after 30 days.
Why it's wrong here
This S3 Lifecycle rule would configure objects to be permanently deleted after 30 days from their creation date. While Expiration is the correct action for permanent removal, a 30-day retention period is often insufficient for application logs, which typically require longer retention for debugging, auditing, or compliance purposes. Therefore, this option deletes the logs prematurely, failing to meet a likely requirement for longer-term availability.
- ✗
Transition objects to Amazon S3 Glacier after 90 days.
Why it's wrong here
Configuring an S3 Lifecycle rule to Transition objects to S3 Glacier after 90 days moves them to a lower-cost archival storage class. While this action occurs after the specified 90-day period, it does not delete the objects; they remain stored in S3 Glacier, incurring storage costs and requiring retrieval operations to access them. This option only archives the data, failing to satisfy any requirement for permanent deletion.
- ✓
Expire objects after 90 days.
Why this is correct
Implementing an S3 Lifecycle rule to Expire objects after 90 days directly addresses the requirement for automatic deletion of application logs. This action permanently removes the objects from the S3 bucket 90 days after their creation, ensuring that old logs are automatically purged. This approach optimizes storage costs and maintains data hygiene without requiring manual intervention, aligning perfectly with a deletion mandate.
- ✗
Transition objects to S3 Standard-IA after 30 days and expire after 90 days.
Why it's wrong here
Transitioning to S3 Standard-IA after 30 days meets the storage-class change requirement but fails to satisfy the 90-day deletion mandate because the lifecycle rule lacks an expiration action; without an explicit expiration directive, objects remain indefinitely. This option is tempting because it correctly reduces storage costs for older logs, and would be correct if the scenario required only tiering after 30 days without automatic deletion.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
One of 724 original DVA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.