Manage AWS Account Using Through Windows-CLI in AWS

Share via:

Dear Readers,

In this article,we will see Manage AWS Account Using Through Windows-CLI in AWS 

Steps to Follow
  1. Generate Access key and Secret key.
  2. Download and Install AWS Command Line Interface Package.
  3. Connect to Windows – CLI by providing Access key and Secret key.
  4. Manage AWS Account

AWS Command Line Interface

The AWS Command Line Interface (AWS CLI) is an open source tool that enables you to interact with AWS services using commands in your command-line shell.

Whatever we do graphically we can do through command line interface.

We can manage entire AWS through command line interface.

If you want to logging to your AWS account through console we need to give username and password.

if you want to logging to your AWS account through CLI we need to give access key ID and secret access key.

Access key is like a username and secret access key is like a password.

By default these key are deleted by  AWS so, we need to generate the keys manually.

First, we need to AWS Console page by using below link.

https://aws.amazon.com/console/

Click on sign in to Console button.

Logging to aws account

Provide username and password then click on sign in.

Enter to AWS Management Console

We can see the AWS Management Console Dashboard.

Generate Access key and Secret key

Go to services and click on IAM under security, identity & Compliance.

In the IAM dashboard we can see “Delete  your root access keys” means these are deleted by AWS default.

we need to generate these keys manually ,so we click on Manage Security Credentials.

Go to Access keys (access key ID and secret access key) and click on Create New Access Key.

The Access Key and Secret Access Key has been created successfully.

We can download keys by clicking on Download Key File.

Go to physical location and see the root.Key.

The machine/laptop can’t support directly to run AWS commands in cmd prompt.

If you want run anything regarding to AWS commands it throw an error.

It will show one error aws is not recognized as an internal or external command.”

To run aws commands in the CLI , we do have AWS Command Line Interface Package.

Download and Install AWS Command Line Interface Package

We need to install one package like AWS CLI then only it will accept to run AWS commands in cmd prompt

Download CLI Package

Download the software by using below link.

https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html#install-msi-on-windows

click on Download AWS CLI MSI installer for windows(64bit).

The software has been downloaded successfully.

Install AWS CLI Package

Go to physical location and double click on the downloaded software.

 

Click on Next.

Accept license Agreement and click on Next.

Click on Next.

Click on Install.

It’s processing it will take some time to complete.

Click on Finish.

The software has been installed successfully , we can check in control panel.

Now, onwards the machine/laptop will accept to run AWS commands in cmd prompt.

If you want to enter credentials we need to run one command “aws configure” then only it will ask the credentials.

Go to physical location and open the file “rootkey”.

In the excel sheet we have AWS Access keyid and AWS secret key.

Copy the AWS Secret key and paste in cmd prompt

Provide Access Key

Copy the AWS Secret key and paste in cmd prompt

Provide Secret Key

Provide default region name

we need to specify official name of the region, if you don’t mention anything it will choose North Virginia by default

For Mumbai —  ap-south-1

Provide Default output format

The default out format is json (if you don’t mention anything it will choose json by default)

If you want to see the output in text format you can give “text”

You have logged into AWS account,now you can do anything.

Create an S3 Bucket

The bucket has created with default permissions

To Check list of S3 Buckets

To Verify Buckets Graphically

Go to S3 console  in that we can the  bucket “ktexpertsbucket”.

Note

In the CLI bucket default access is public.

In the Graphical bucket default access is private.

Copy object from base machine to S3 bucket

Go to object path and run the command.

To Verify Graphically

Go to S3 console in that we can see the object “versioning1.txt” in the bucket “ktexpertsbucket”

Note

In the CLI by default the object is in private access.

Create an IAM User

To Check Graphically

Go to services and click on IAM under Security, Identity & Compliance.

In the users we can see user ”Ramesh” that was created in CLI.

Create an IAM Group

To Verify Graphically

Go to IAM Dashboard in that we can see the group “ktexperts” which was created in CLI.

 

 

Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates

KTEXPERTS is always active on below social media platforms.

Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts
Instagram : https://www.instagram.com/knowledgesharingplatform

 

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Add Comment