1. (For Windows):
  1. (For Linux):
  2. (For Mac):

1)Login in to AWS Account

> aws configure
AWS Access Key ID [None]: *******************
AWS Secret Access Key [None]: ***************
Default region name [None]: ap-south-1
Default output format [None]: json

2) Create key-pair

> aws ec2 create-key-pair  — key-name MYKEY — query keyinfo  — output text > MYKEY.pem

3) Create security Group

>aws ec2 create-security-group — group-name MyCLiSecurityGroup — description “My security group” 
> aws ec2 authorize-security-group-ingress --group-id sg-0ac9d9eddb7112a21 --protocol all --port all --cidr
> aws ec2 describe-security-groups

4) Now, we have to launch an EC2 Instance using the Key-Pair and the Security Group that we have created in the above previous steps.

> aws ec2 run-instances --image-id ami-081bb417559035fe8 --instance-type t2.micro --security-group-ids  sg-0ac9d9eddb7112a21 --key-name MYKEY
> aws ec2 create-volume --availability-zone ap-south-1a --size 1
  1. Partition
  2. format
  3. mount The EBs So EBs attach with Instances
> fdisk /dev/sdf
> mkfs.ext4 /dev/sdf
> mount /dev/sdf /mydrive
> df -h

Thanks readers for reading!!!



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