Manage AWS Using Through Amazon Linux CLI in AWS

Share via:

Dear Readers,

In this article,we will see Manage AWS Using Through Amazon Linux CLI in AWS.

Steps to Follow
  1. Generate Access key and Secret key.
  2. Launch Linux Server and connect to Linux Server through putty.
  3. Connect to Linux Server – 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.

Launch Linux Server and Connect to Linux Server through Putty

Launch Linux Server in AWS

Once you connect, you will successfully see the Linux Virtual Server Prompt.

Connect to Amazon Linux CLI

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

Copy the AWS Access 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”

Manage AWS Account

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 “ktexpertsbucket1”

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 ”Ramu” that was created in CLI

 

Create an IAM Group

 To Verify Graphically

Go to IAM Dashboard in that we can see the group “ktexperts1” 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