AWS CLI

Jasmine Kalra
2 min readOct 14, 2020

--

Task AWS CLI:

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.

Create a Key Pair

C:\Users\HP>aws ec2 create-key-pair — key-name cli-key-1

Create Security Group

C:\Users\HP>aws ec2 create-security-group — group-name Jasmine — description “My new Security Group”
{
“GroupId”: “sg-0f651eeace485f116”
}

Launch ec2 instance using above created security group and created key pair

aws ec2 run-instances — image-id ami-0e306788ff2473ccb — instance-type t2.micro — count 1 — subnet-id subnet-8a2128e2 — security-group-ids sg-0f651eeace485f116 — key-name cli-key-1

WEB UI:

Create EBS volume of 1GB

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

Attach EBS volume to running ec2 instance which we have launched previously

C:\Users\HP>aws ec2 attach-volume — device /dev/sdf — instance-id i-00572ca4d7d7ab428 — volume-id vol-089dab04b218c9983

THANK YOU !

SUBMITTED BY JASMINE KALRA

GROUP -13

--

--