08. Configuring AWS CLI

ND9991 C02 L01 A05 Configuring AWS CLI

Best Practices

Regarding your access keys it's always best to…

SOLUTION:
  • Rotate them (change them ) frequently
  • Make them inactive if they won't be used for a while

Configuring the AWS Command Line Interface (CLI)

  • Download and install the AWS CLI tool.
  • In the terminal, type aws --version: this verifies that you have the AWS CLI tool.
  • To set up your AWS CLI, type aws configure in the terminal. Next when prompted for the AWS Access Key ID, paste in your Secret access key.
  • Region: Please use us-west-2, even if you’re living closer to another available region.

Verifying your Setup

  • One way to check if your AWS CLI is set up properly is to try a command. You can try listing your S3 buckets:aws s3 ls . This will be blank if you have no S3 buckets. However, if you have no error message, then you’ve verified that your user has API access to communicate with AWS.
  • Note that each user can have up to 2 access keys at the same time.