Bird
0
0

You run this command but get an error:

medium📝 Debug Q14 of 15
AWS - CloudWatch
You run this command but get an error:
aws logs put-retention-policy --log-group-name NonExistentGroup --retention-in-days 30
What is the most likely cause?
AThe log group 'NonExistentGroup' does not exist
BRetention period 30 days is not allowed
CYou must specify a log stream name instead
DThe AWS CLI command is misspelled
Step-by-Step Solution
Solution:
  1. Step 1: Check existence of log group

    The command requires the log group to exist before setting retention.
  2. Step 2: Validate retention period and command syntax

    Retention of 30 days is valid and the command syntax is correct.
  3. Final Answer:

    The log group 'NonExistentGroup' does not exist -> Option A
  4. Quick Check:

    Retention needs existing log group [OK]
Quick Trick: Retention policy requires existing log group [OK]
Common Mistakes:
MISTAKES
  • Assuming retention period is invalid
  • Confusing log stream with log group
  • Thinking command syntax is wrong

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes