How To Setup AWS CLI on Linux/Windows

Using AWS command line tool (AWS cli) , you can manage most of the AWS resources.

Ubuntu:

In ubuntu AWS cli isstallation has to be done using python tool pip. pip is used for managing python packages.
1. Install pip using the following command.

2. Issue the following command to install aws cli using pip

3. Create a .aws-config file in your $HOME path. eg /root/.aws-config
4. Copy the following credentials to the .aws-config file and enter you AWS access and secret key id in the required fields.

5 . Set AWS_CONFIG_FILE environment variable using the following command.

6. You can test the cli setup using the following command. It give you the region information in a json format.

7. You can also use aws configure command to set up the configuration file for aws credentials. 

RHEL/Centos:

1. Install pip using the following command

2. If your linux machine is on AWS, since pip is not in the localrepo , you have to install pip using the following commands

ALSO READ:  How to Setup Password Authentication For AWS ec2 Instances

3. Install aws cli using the following command.

4. Use the following command to set up the configuration file for AWS credentials.

5. The above command will ask you to enter the access key , secret key, region and ouput format. Once you provide the details, the config file will be automatically created in /root/.aws/config. you cna test the cli setup using the following command. 

Windows:

1. Download and install the aws cli msi package from here
2. Once installed, open the command promt and use the following command to configure aws cli with aws credentials.

3. You will be promted to provide aws credentials, default region and output format. Once details are provided , it will configure awscli with your credentials.

ALSO READ:  Amazon AWS Cloud Computing Certification and Training

4. Test AWS cli setup using the following command.

0 Comments

Leave a Reply

Related

The majority of the big, small and medium businesses moved their infrastructure to cloud for agility, scalability,…

Read more
Password Authentication For AWS ec2 Instances

By default, ec2 instances don't┬áhave password authentication. You have to use the private key to connect to the…

Read more

To launch an UBUNTU instance on amazon EC2 , you need an account in www.aws.amazon.com. You need to have a valid credit…

Read more

Have some content ideas! We will help you publish it!

About

Cloud Computing Tutorial Blog

Navigation