Courseiva
Design for New SolutionshardMultiple ChoiceObjective-mapped

SAP-C02 Design for New Solutions Practice Question

Exhibit

Refer to the exhibit.
Resources:
  MyBucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: !Sub '${AWS::StackName}-data'
      VersioningConfiguration:
        Status: Enabled
      LifecycleConfiguration:
        Rules:
          - Id: ExpireOldVersions
            Status: Enabled
            NoncurrentVersionExpirationInDays: 30

Refer to the exhibit. A CloudFormation template is used to create an S3 bucket. After deployment, the bucket is created but objects are not automatically deleted after 30 days as expected. What is the most likely cause?

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 only applies to noncurrent versions, not current objects.

The lifecycle rule in the template likely uses `NoncurrentVersionExpirationInDays`, which only applies to noncurrent versions, not current objects. To delete current objects after 30 days, an `ExpirationInDays` rule is needed. Versioning being enabled (option C) is necessary for the noncurrent version expiration to work, but the issue is that current objects are not expiring. The bucket name conflict (option B) would cause a deployment failure, not a lifecycle misconfiguration. Region-specific prefix (option D) is not required for lifecycle rules.

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 lifecycle rule only applies to noncurrent versions, not current objects.

    Why this is correct

    NoncurrentVersionExpirationInDays only deletes old versions, not current objects.

  • The bucket name conflicts with an existing bucket.

    Why it's wrong here

    Would cause stack creation failure, not lifecycle issue.

  • Versioning is not enabled on the bucket.

    Why it's wrong here

    Versioning is enabled in the template.

  • The lifecycle rule requires a region-specific prefix.

    Why it's wrong here

    No prefix needed for bucket-level rules.

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

About these practice questions

This SAP-C02 question is part of Courseiva's 1,660-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.