AWS CLI Change Default Output Format


By default the output from an AWS CLI Command is in a JSON format, if you did make use of the aws configure command to set a default output value and you want to change it again, well you can do it in a couple of ways.


Option 1: Using "aws configure set" Command

% aws configure set output table
AWS CLI change default Output Option

Option 2: Using "aws configure" Command

When you run the "aws configure" command again, you can change the default output value.

% aws configure

AWS Access Key ID [****************H7NS]: 
AWS Secret Access Key [****************hwSd]: 
Default region name [us-east-2]: 
Default output format [table]: json

Simply press enter where you do not want to change the previous values.


Option 3: Manually editing the config file.

% nano ~/.aws/config
[default]
region = us-east-2
output = yaml

Note: You can choose from the below output format options.

Output FormatDescription
jsonOutput in JSON format (default)
textOutput in plain text format
tableTabular output format.
yamlYAML format output
-

Facing issues? Have Questions? Post them here! I am happy to answer!


Author: Rakesh
Author Info:

Rakesh is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

Copyright © Code2care 2023 | Privacy Policy | About Us | Contact Us | Sitemap