How to configure AWS CLI and tool setup using command prompt - Part 1

How to configure AWS CLI and tool setup using command prompt-Part 1



Before configuring AWS CLI we must sign up AWS account (if not registered yet) and you need to get access details keys.

Access keys contains 'Access ID' and 'Secret Access Key' which will be using to access AWS services. We can also create keys from AWS console management by following steps below.

AWS Console Management -> Services ->  IAM -> and click on IAM.

IAM means Identity and Access Management which provides secure access to AWS services and resources.

Now click on 'Users' menu and then click on your user.

Then click on tab 'Security Credentials' here you create new access key.

Click on 'Create Access Key' button to get your 'Access ID' and 'Secret Access Key'.
Save this in secure place for further operations.

Now we are ready to configure AWS CLI. Use command below and enter.

>> aws configure

once you press enter it will ask for AWS Access Key, enter the access key that you just created and press enter.

Then it will ask to set default region name

>> Default Region Name [none]:

AWS spread a crossed multiple geographical locations a crossed the world. These locations are composed of regions and availability zones. Each region has multiple location called as availability zone. Default region is the name of region which usually nearest to your business but it can any region depending on requirements.

Lets set a region US East (N. Virginia) as follow.

>>  Default region name [None]: us-east-1

Please note if we do not set any value then default value will be None.

So there are three important configured parameters, which are

  1. AWS Access Key ID
  2. AWS Secret Access Key
  3. Default region name


There one more optional parameter AWS provides which is "Output Format". AWS provides three types of output formats which are.

  1. JSON (Default format)
  2. Text
  3. Table


Lets see examples of formats write command below and press enter.

>> aws ec2 describe-instances 

this will display list of all running EC2 instances of your account in JSON default format.

If you want to change output format the we can use commands below.

For Text Format:>> aws ec2 describe-instances --output text

For Table Format:>> aws ec2 describe-instances --output table

AWS stored these credentials details in two files which stored on user's directory.

1: Credentials File: contains AWS Access Key ID and AWS Secret Access Key

>> vim ~/.aws/credentials

2: Config File: contains Default region name

>> vim ~/.aws/config

Please note we can edit and updates these values any time by using commands above.

Watch Video:





How to configure AWS CLI and tool setup using command prompt - Part 2


Related Posts:


What is AWS CLI (Amazon web services command line interface )


How to configure AWS CLI and tool setup using command prompt - Part 1 How to configure AWS CLI and tool setup using command prompt - Part 1 Reviewed by Pranay Gondane on 9:16:00 AM Rating: 5

No comments

Free! Free!Free! Subscribe to Get Free PHP (Magento) tutorial Update in Your Inbox!!! Hurry Up!!!