Bird
0
0

How can you configure AWS CLI to always output in JSON format without specifying --output each time?

hard📝 Application Q9 of 15
AWS - CLI
How can you configure AWS CLI to always output in JSON format without specifying --output each time?
ASet 'output = json' in the AWS CLI config file
BUse environment variable AWS_OUTPUT=json
CAdd --default-output json to each command
DSet 'format = json' in the AWS credentials file
Step-by-Step Solution
Solution:
  1. Step 1: Identify AWS CLI configuration method

    The AWS CLI config file (~/.aws/config) allows setting default output format.
  2. Step 2: Correct config syntax

    Setting 'output = json' under the profile section sets default output to JSON.
  3. Final Answer:

    Set 'output = json' in the AWS CLI config file -> Option A
  4. Quick Check:

    Default output set in config file with 'output = json' [OK]
Quick Trick: Set output in ~/.aws/config to avoid --output flag [OK]
Common Mistakes:
  • Using wrong environment variable
  • Editing credentials instead of config file

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes