Bird
0
0

You wrote this lifecycle rule but it does not delete files after 90 days:

medium📝 Debug Q14 of 15
AWS - S3 Fundamentals
You wrote this lifecycle rule but it does not delete files after 90 days:
{
  "Rules": [{
    "Status": "Enabled",
    "Expiration": {"Days": 90}
  }]
}
What is the likely problem?
AMissing a required rule ID
BStatus should be set to Disabled to activate
CExpiration action cannot be used without Transition
DRule is missing a filter or prefix to target objects
Step-by-Step Solution
Solution:
  1. Step 1: Recall S3 lifecycle rule required fields

    Every lifecycle rule requires a unique "ID" field only if using AWS CLI or SDKs; however, in JSON configuration for S3 console, "ID" is optional. Filter or prefix is required to target objects; otherwise, the rule applies to all objects.
  2. Step 2: Analyze given rule

    The rule lacks a filter or prefix, so it applies to all objects. If files are not deleting, likely the rule is not targeting the intended objects. Missing "ID" is not always mandatory (A wrong). Status "Enabled" is correct (B wrong). Expiration works standalone (C wrong). Filter or prefix is needed to target specific objects (D correct).
  3. Final Answer:

    Rule is missing a filter or prefix to target objects -> Option D
  4. Quick Check:

    Missing filter or prefix means rule may not target intended objects = D [OK]
Quick Trick: Filter or prefix is needed to target objects for deletion [OK]
Common Mistakes:
  • Believing filter or prefix is optional (A)
  • Thinking Expiration requires Transition (C)
  • Status should be Disabled to activate (B)

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes