SCS-C02 S3 Object Lock Practice Question
A company is implementing a data retention policy for CloudTrail logs. The logs are stored in an S3 bucket. The policy requires that logs be retained for 7 years and then automatically deleted. Which TWO actions should the security engineer take to meet this requirement?
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
✓
Enable S3 Object Lock in compliance mode on the bucket.
To retain logs for 7 years and then automatically delete, the security engineer should enable S3 Object Lock in compliance mode (B) to prevent any deletion during the retention period, and create an S3 Lifecycle policy to expire objects after 2555 days (E). The Object Lock ensures logs cannot be deleted prematurely, while the lifecycle policy handles automatic deletion after 7 years. Option C is incorrect because denying s3:DeleteObject to all principals would block the lifecycle policy from deleting objects. Options A and D are not suitable for this requirement.
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 AWS Backup to manage retention and deletion.
Why it's wrong here
AWS Backup manages backups of resources like EC2 and RDS, not the lifecycle of CloudTrail log objects in S3; it cannot enforce a 7-year deletion rule on S3 objects. This option is tempting because AWS Backup does handle retention policies and automated deletion for supported resources, making it seem applicable to log retention. It would be correct if the requirement involved backing up CloudTrail logs to a separate backup vault with a defined retention period, rather than deleting the original S3 objects directly.
- ✓
Enable S3 Object Lock in compliance mode on the bucket.
Why this is correct
Correct. Enabling S3 Object Lock in compliance mode prevents any deletion of objects during the retention period, ensuring logs are retained for 7 years.
- ✗
Configure the S3 bucket policy to deny s3:DeleteObject actions for all principals.
Why it's wrong here
Incorrect. Denying s3:DeleteObject to all principals would prevent the lifecycle policy from automatically deleting objects after 7 years, contradicting the requirement.
- ✗
Enable S3 Versioning and create a lifecycle policy to delete noncurrent versions.
Why it's wrong here
Incorrect. Enabling versioning and creating a lifecycle policy for noncurrent versions does not address the need to delete current versions after 7 years.
- ✓
Create an S3 Lifecycle policy that expires objects after 2555 days (7 years).
Why this is correct
Correct. An S3 Lifecycle policy that expires objects after 2555 days (7 years) will automatically delete the logs after the retention period.
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
This SCS-C02 question is part of Courseiva's 376-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 SCS-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 SCS-C02 exam.