Services >> Cloud >> AWS >> CLI >> Quick Reference for Windows

GET STARTED - create config & credentials file for current user

<install_path>\AWSCLI> aws configure

AWS Access Key ID [None]: you_access_key_ID
AWS Secret Access Key [None]: your_secret_acces_key
Default region name [None]: region
Default output format [None]: json

this will create the following

%USERPROFILE%\.aws\config
%USERPROFILE%\.aws\credentials

 

CLEARING CACHED CREDENTIALS

> del /s /q %UserProfile%\.aws\cli\cache

 

TEST

aws ec2 describe-regions --output table

ENVIRONMENT VARIABLES

AWS_ACCESS_KEY_ID – AWS access key.
AWS_SECRET_ACCESS_KEY – AWS secret key. Access and secret key variables override credentials stored in credential and config files.
AWS_SESSION_TOKEN – Specify a session token if you are using temporary security credentials.
AWS_DEFAULT_REGION – AWS region. This variable overrides the default region of the in-use profile, if set.
AWS_DEFAULT_OUTPUT – Change the AWS CLI's output formatting to json, text, or table.
AWS_PROFILE – name of the CLI profile to use. This can be the name of a profile stored in a credential or config file, or default to use the default profile.
AWS_CA_BUNDLE – Specify the path to a certificate bundle to use for HTTPS certificate validation.
AWS_SHARED_CREDENTIALS_FILE – Change the location of the file that the AWS CLI uses to store access keys.
AWS_CONFIG_FILE – Change the location of the file that the AWS CLI uses to store configuration profiles