Bird
0
0

What will be the output of this AWS CLI command if the secret 'api-key' does not exist?

medium📝 Analysis Q5 of 15
Microservices - Configuration and Secrets Management
What will be the output of this AWS CLI command if the secret 'api-key' does not exist?
aws secretsmanager get-secret-value --secret-id api-key
AThe command creates a new secret named 'api-key'.
BAn empty string returned as the secret value.
CAn error message indicating the secret was not found.
DA default secret value is returned automatically.
Step-by-Step Solution
Solution:
  1. Step 1: Understand AWS CLI behavior for missing secrets

    If the secret does not exist, AWS Secrets Manager returns an error message indicating the secret was not found.
  2. Step 2: Eliminate incorrect behaviors

    The CLI does not return empty strings, default values, or create secrets automatically.
  3. Final Answer:

    An error message indicating the secret was not found. -> Option C
  4. Quick Check:

    Missing secret = error message [OK]
Quick Trick: Missing secret causes error, no default or creation [OK]
Common Mistakes:
  • Expecting empty or default values
  • Thinking CLI auto-creates secrets
  • Assuming silent failure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes