Bird
0
0

Given the following AWS credentials file snippet:

medium📝 Predict Output Q4 of 15
AWS - CLI
Given the following AWS credentials file snippet:
[dev]
aws_access_key_id=AKIADEV123
aws_secret_access_key=devsecretkey

[prod]
aws_access_key_id=AKIAPROD456
aws_secret_access_key=prodsecretkey

What will be the output of the command aws sts get-caller-identity --profile prod?
AReturns default profile identity
BReturns the identity associated with the prod profile credentials
CReturns an error because profile is not specified correctly
DReturns the identity associated with the dev profile credentials
Step-by-Step Solution
Solution:
  1. Step 1: Understand profile usage in AWS CLI

    Specifying --profile prod uses credentials under [prod] section in credentials file.
  2. Step 2: Determine command output

    The command returns the AWS identity for the credentials under the prod profile.
  3. Final Answer:

    Returns the identity associated with the prod profile credentials -> Option B
  4. Quick Check:

    Profile used = prod, output = prod identity [OK]
Quick Trick: Use --profile to select correct credentials for commands [OK]
Common Mistakes:
MISTAKES
  • Assuming default profile is used without --profile
  • Confusing profile names
  • Expecting error due to correct profile usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes