अर्थ Program Task — 3

SIBAYAN BAG
3 min readNov 3, 2020

Task Description — ARTH 👨🏻‍💻

1-> Create a key pair
2-> Create a security group
3-> Launch an instance using the above created key pair and security group.
4-> Create an EBS volume of 1 GB.
5-> The final step is to attach the above created EBS volume to the instance you created in the previous steps.

The Above task need to be done using AWS CLI.

First we need to create a IAM user from our AWS account to get access to all the services except IAM and billing account which provides access key and secret key as username and password that help us to log in to the AWS CLI.

So first create IAM user:-

IAM user created ………

Now log in to AWS CLI using Windows command prompt:-

use command->

aws configure

Then enter Access key and secret key you will successfully log in to the aws cli.

Creation Of Key Pair :-

to create key pair->

>aws ec2 create-key-pair — key-name mykey

Key Pair created…….

Creation Of Security Group :-

To create security group ->

>aws ec2 create-security-group -group-name mysecurity — description “CLI Security Group”

Security group created……..

Launch an instance using the above created key pair and security group :-

To launch instance ->

>aws ec2 run-instances — image-id ami-052c08d70def0ac62 — instance-type t2.micro — count 1 — security-group-ids sg-0341318d6091607aa — key-name mykey

Instance launch successfully………

Creation of EBS volume of 1 GB :-

To create EBS volume ->

>aws ec2 create-volume — volume-type gp2 — size 1 — availability-zone ap-south-1a

EBS volume created……..

To attach the above created EBS volume to the instance :-

To attach volume ->

> aws ec2 attach-volume — volume-id vol-0fe5c1584e4d57688 — instance-id i-0856b1f47852457f3 — device /dev/sdf

Attach volume successfully…….

Task Completed …..

Thank You for Reading !!!!!!!

--

--