Working with AWS Cloud from CommandLine — Part1

Sunny Goswami
4 min readNov 18, 2020

--

In this article, we will understand how to setup aws cli in a system to work with AWS Cloud from Command line.

To work with aws cli through command line, first, we are required to create an IAM user. Then, the IAM user created will be assigned suitable powers or permissions, that will allow him to interact with AWS Cloud.

Also, below steps are same for Windows and for any Linux Operating system. So you can choose any OS to work on.

Step 1: Creating an IAM User:

For this Step, we will be using the AWS GUI:

Step 1: Open the IAM service, present under Security, Identity and Compliance.

Step 2: Click on Users.

You will be redirected to this page, where we have an option to add user.

Step 3: Click on Add user.

  • Specify the IAM user name,
  • Enable both the access type.
    Programmatic Access allows this user to interact with AWS cloud using non-GUI methods such as CLI or SDK.
    AWS Management console access is to allow this user to use the AWS GUI.
  • Specify a custom password.
  • Uncheck the Required Password Reset.

After this click on Next: Permissions.

Step 4: Setting up the Permissions for this user.

We will be assigning predefined Policy to this user: PowerUserAccess. In this policy, a user is allowed to interact with all the services of aws cloud except Billing and IAM user.

Click on Next:Tags

Step 5: Add Tags.

This step is Optional, you can skip this page.

Click on Next:Review, and then on, Create User.

Download the .csv file which contains the credentials of this user.
Note: This page will only appear this one time.

Step 2: Downloading the aws cli version 2.

For windows, follow this webpage:

For Linux, follow this webpage:

Step 3: Configuring the User in the aws cli.

In this step, we will add the IAM user in the aws cli that we created earlier, which will on our behalf, would interact with the AWS Cloud.

Open the credentials file and type the following command in the command Prompt/Terminal.

Command: aws configure

Enter the access key id, secret key, specify the region, you want to launch instance in. I will be using Mumbai Region(ap-south-1)

Rerun the same command to verify that the user is added successfully.

And that’s it.. Done!

Follow the next part in the series to understand how to launch an ec2 instance from command line.

📝 ️Few Last Words

→ I will be sharing many article’s on Integrating multiple tools and technologies Cloud Computing, DevOps, Big Data Hadoop, Machine Learning etc. in Upcoming days .

→ Follow me on Medium for more Article’s on Research based and integration of new new tools and technologies .

For Furthur Queries, Suggestion’s Feel Free to Connect with me On Linkedin .

For any doubt or query, let me know in the comment section!

If you like it then Clap & Share ..

Thank you EveryOne For reading .!! | arigatou gozaimasu. sayonara!

--

--

No responses yet