How to Configure the AWS CLI

In this tutorial, I will show you how to set up and configure the AWS CLI on a AWS Linux AMI.

Prerequisites

  1. You have created your AWS EC2 instance using the standard Linux AMI and can get access to it using SSH
  2. You have set up security credentials in IAM and have downloaded your access keys

Configuring the AWS CLI

Step 1 – SSH into the instance and login as ec2-user

Step 2 – Type the following at the prompt

$ aws configure

Step 3 – Enter your Access Key ID

Step 4 – Enter your Secret Access Key

Step 5 – Enter the Default region name

Step 6 – Enter the Default output format

$ aws configure
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]: json

Leave a Reply