Start your technical journey of AWS. As a programmer let’s work on AWS CLI

Why AWS CLI?

AWS CLI gives you the ability to automate the entire process of controlling and managing AWS services through scripts. These scripts make it easy for users to fully automate cloud infrastructure. Prior to AWS CLI, users needed a dedicated CLI tool for just the EC2 service.

✅TASK DESCRIPTION:

📌 Create a key pair

📌 Create a security group

📌 Launch an instance using the above created key pair and security group.

📌 Create an EBS volume of 1 GB.

📌 The final step is to attach the above created EBS volume to the instance you created in the previous steps.

💥Installing AWS CLI :

Installation of AWS CLI is so simple. You just need to download the application from the below mentioned link and like we install any other application, just run the application and keep on clicking and it will be installed.

✔Check if it has installed properly :

💥Configuring AWS CLI :

Before starting, we need aws access key and secret key for configuration. Because for humans we use username and password for authentication. But to authenticate any program we use access key and secret key.

  • To, get those things you need to go to your AWS account from AWS Web Console. Then go to “IAM” service => click on “Users” => then click on “Add User” and create one user.
  • Then click on “Programmatic access” and if you read the description of this access you can see, it’s giving us “access key” and “secret key”. For reference follow the below mentioned screenshot…

Next click on “Tags” and give any desired tag. Then click on “review” and then click on “Create User”. Next it will provide you one option to see your Access Key and Secret Key. Don’t forget to “Download” the credentials by clicking on the download button for future reference.

Step 1:Login to AWS Using security credentials of IAM User we created .

aws configure

Step 2: Create a key pair

For creating Key Pair we have command as :

aws ec2 create-key-pair --key-name awscli

Step 3: Create Security group

To create Security group we have the following command :

aws ec2 create-security-group --group-name awsArth--description Arth

Step 4: Launch one EC2 Instance using above Key pair and Security Group

To launch ec2 instance AWS CLI has command as :

aws ec2 run-instances --instance-type _type_ --image-id ami_id --key-name key_name --security-group-ids   group_id  --count no_of_instance --subnet-id

Step 5: Create one EBS Volume and attach it to the EC2 Instance we launched

To Create EBS Volume AWS CLI has command as :

aws ec2 create-volume --volume-type volume_type --size volume_size --availability-zone AZ_name

Step 6 : Attach EBS Volume to EC2 Instance

we have command :

aws ec2  attach-volume   --volume-id volume_id   --instance-id instance_id  --device device_name

Thank You for reading my Article!!!😊

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Who Drives Modern EA Best Practices and Content?

Attending Hands-On Tutorial: Introduction to oneAPI with Intel® FPGAs at FPGA 2021 Conference

BP.json Update

What is taxi dispatch system?

Example of treeview Menu Using bootstrap 4 — Bootstrap

Death By A Thousand Pythonic Keystrokes

Top 5 Kotlin features for better readability

The Substantial Value of Commence CRM Lead Tracking Software

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adarsha Dinda

Adarsha Dinda

More from Medium

Something to live for! — Quotidian — 002

CS373 Spring 2022: Kristina Zhou

Schedule Map

Don’t build MVP, build something simpler