Question 974 of 1,746
Design for New SolutionseasyMultiple ChoiceObjective-mapped

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.

Exhibit

Refer to the exhibit.

```
AWSTemplateFormatVersion: '2010-09-09'
Resources:
  MyBucket:
    Type: 'AWS::S3::Bucket'
    Properties:
      BucketName: my-app-data-bucket
      VersioningConfiguration:
        Status: Enabled
      LifecycleConfiguration:
        Rules:
          - Id: ArchiveRule
            Status: Enabled
            Transitions:
              - TransitionInDays: 30
                StorageClass: STANDARD_IA
              - TransitionInDays: 90
                StorageClass: GLACIER
            ExpirationInDays: 365
```

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?

Exhibit

Refer to the exhibit.

```
AWSTemplateFormatVersion: '2010-09-09'
Resources:
  MyBucket:
    Type: 'AWS::S3::Bucket'
    Properties:
      BucketName: my-app-data-bucket
      VersioningConfiguration:
        Status: Enabled
      LifecycleConfiguration:
        Rules:
          - Id: ArchiveRule
            Status: Enabled
            Transitions:
              - TransitionInDays: 30
                StorageClass: STANDARD_IA
              - TransitionInDays: 90
                StorageClass: GLACIER
            ExpirationInDays: 365
```

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

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.

Key principle: CloudFormation LifecycleRule Filter

Answer analysis

Option-by-option breakdown

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 ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-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.

Related practice questions

Related SAP-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 SAP-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 SAP-C02 question test?

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 →

How Courseiva writes practice questions · Editorial policy

Keep practising

More SAP-C02 practice questions

Last reviewed: Jul 4, 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 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.