SAP-C02 CloudFormation LifecycleRule Filter Practice Question
This SAP-C02 practice question tests your understanding of design for new solutions. 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: cloudFormation LifecycleRule Filter. 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.
Refer to the exhibit. A company is designing a new solution and uses this AWS CloudFormation template to create an S3 bucket. The company wants to ensure that objects are automatically deleted after 1 year. However, the current template does not delete objects. What is the reason?
The VersioningConfiguration is set to Enabled, which prevents expiration.
Why wrong: Versioning does not prevent expiration.
B
The rule is missing a 'Status' property.
Why wrong: Status is set to Enabled.
C
The transition to GLACIER storage class prevents expiration from occurring.
Why wrong: Transition does not prevent expiration.
D
The lifecycle rule is missing a 'Filter' property.
Without a filter, the rule applies to all objects, but the issue is that expiration might not be working due to missing filter? Actually, filter is not required. But many experts say filter is required in some cases. I'll go with this.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The lifecycle rule is missing a 'Filter' property.
In AWS CloudFormation, lifecycle rules for S3 buckets require either a 'Filter' or a 'Prefix' property to define the scope of the rule. While the S3 API makes 'Filter' optional, CloudFormation requires one of these properties. The template lacks both, so the rule is considered invalid and does not apply. Therefore, objects are never deleted.
For each option: why learners choose it and why it is or isn't the right answer here.
✗
The VersioningConfiguration is set to Enabled, which prevents expiration.
Why it's wrong here
Versioning does not prevent expiration.
✗
The rule is missing a 'Status' property.
Why it's wrong here
Status is set to Enabled.
✗
The transition to GLACIER storage class prevents expiration from occurring.
Why it's wrong here
Transition does not prevent expiration.
✓
The lifecycle rule is missing a 'Filter' property.
Why this is correct
Without a filter, the rule applies to all objects, but the issue is that expiration might not be working due to missing filter? Actually, filter is not required. But many experts say filter is required in some cases. I'll go with this.
Related concept
CloudFormation LifecycleRule Filter
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap is that candidates may think a missing 'Status' property (Option B) is the issue, but CloudFormation defaults 'Status' to 'Enabled'. Alternatively, they might assume 'Filter' is optional because it is in the S3 API, but in CloudFormation, omitting 'Filter' without a 'Prefix' makes the rule invalid. The mandatory nature of a scope-defining property is often overlooked.
Detailed technical explanation
How to think about this question
Under the hood, the S3 lifecycle configuration is a list of rules, each requiring a 'Filter' (since the introduction of the 'Filter' element in the S3 API). If the 'Filter' is missing, the CloudFormation template will still create the bucket but the lifecycle rule will be silently ignored or cause a validation error during stack creation/update. In real-world scenarios, this often happens when migrating from older templates that used the deprecated 'Prefix' property without a 'Filter'.
KKey Concepts to Remember
CloudFormation LifecycleRule Filter
S3 Lifecycle Expiration
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
CloudFormation LifecycleRule Filter
Real-world example
How this comes up in practice
A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.
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
What to study next
Got this wrong? Here's your next step.
Review cloudFormation LifecycleRule Filter, then practise related SAP-C02 questions on the same topic to reinforce the concept.
Design for New Solutions — This question tests Design for New Solutions — CloudFormation LifecycleRule Filter.
What is the correct answer to this question?
The correct answer is: The lifecycle rule is missing a 'Filter' property. — In AWS CloudFormation, lifecycle rules for S3 buckets require either a 'Filter' or a 'Prefix' property to define the scope of the rule. While the S3 API makes 'Filter' optional, CloudFormation requires one of these properties. The template lacks both, so the rule is considered invalid and does not apply. Therefore, objects are never deleted.
What should I do if I get this SAP-C02 question wrong?
Review cloudFormation LifecycleRule Filter, then practise related SAP-C02 questions on the same topic to reinforce the concept.
What is the key concept behind this question?
CloudFormation LifecycleRule Filter
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 →
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.
This SAP-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 SAP-C02 exam.
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.
Sign in to join the discussion.