Basic Examples of AWS Configuration
- Initiating the AWS Configuration
aws configure --profile profile_name
If you don’t specify the –profile option, it will configure the default profile. Otherwise, it will configure the profile specified by the profile name.
- Setting up keys in AWS Configure
aws configure set aws_access_key_id YOUR_ACCESS_KEY
aws configure set aws_secret_access_key YOUR_SECRET_KEY
Replace YOUR_ACCESS_KEY, YOUR_SECRET_KEY with your actual AWS access key, AWS secret key
Note: These commands are used when you want to modify your AWS access key and secret key
- Setting the Default output Format
use the below command to set the default output format for CLI commands
aws configure --default output format json
- Change the default output format using
aws configure set default_output_format table
- Selecting the Output as per command
Below command will override your selected default output format
aws ec2 describe-instances --output table
- Configuring a profile:
This will create a new profile named myprofile with its own credentials and default region.
aws configure set profile demoprofile
AWS Access Key ID for profile demoprofile [REQUIRED]: YOUR_ACCESS_KEY_ID_FOR_MYPROFILE
AWS Secret Access Key for profile demoprofile [REQUIRED]: YOUR_SECRET_ACCESS_KEY_FOR_MYPROFILE
Default region name for profile demoprofile: YOUR_REGION_NAME
How Do I Clear The Credentials In AWS Configure ?
AWS Configure is a command-line tool provided by Amazon Web Services’s command line interface (CLI) that allows users to configure their AWS CLI credentials, such as access keys, secret keys, default region, output format, etc. You can interact with numerous AWS services directly from your terminal with the help of AWS Configure. use the CLI by setting up the AWS configuration so that users can automate repetitive tasks by using scripting.