- Create and download Access Key and secret
- Use
aws configure
to configure the CLI
The AWS CLI must be installed to perform these steps
Use the following link to install the AWS CLI on your platform:
https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html
Create an Access Key and Secret
- In the AWS Console, click on your name
- Select "My Security Credentials"
- Click on the "Access Keys" section
- Click the "Create New Access Key" button
- Click the "Download Key File" button
- Click the "Close" button
Configure the AWS CLI
- Open the downloaded "rootkey.csv" file
- In your command line, run the command
aws configure
- The first prompt will say "AWS Access Key ID". Enter the "AWSAccessKeyID" value from the file and hit "enter"
- The next prompt will say "AWS Secret Access Key". Enter the "AWSSecretKey" value from the file and hit "enter"
- Enter your default region if desired. Hit enter
- Enter your default output format (text or json) if desired. Hit enter
- To confirm everything works, run the command
aws ec2 describe-instances