Using AWS console via AWS CLI

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

Create Key Pair

aws ec2 help
aws ec2 create-key-pair help
Before command “aws ec2 create-key-pair — key-name MyKeyPair”
creating keypair with command “aws ec2 create-key-pair — key-name testkeypair”
after running command “testkeypair” added

Create a Security Group

To create security group using aws cli we must explore aws with its “aws help” command . Security Group must be in Ec2 instance so we give command “aws ec2 create-security-group”. We must explore this by help command “aws ec2 create-security-group help” .

command “aws ec2 create-security-group help”
Run the command
After running the command

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

To launch instance using aws cli we must explore aws with its “aws help” command . Instance must be launched in Ec2service of aws so we give command “aws ec2 run-instances”. We must explore this by help command “aws ec2 run-instances help” .

Before running the command
command run
After running command one instance is launched in aws WebUI

Create an EBS volume of 1 GB

EBS storage of 1 GB must be launched and attach in the Ec2 instance of aws so we give command “aws ec2 create-volume”. We must explore this by help command “aws ec2 create-volume help” .

command “aws ec2 create-volume help”
Before running command
running command
After running the command

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

To attach above EBS volume to our above created instance we use command

Before only one single storage is attached
Run the command
Now the EBS storage is added

--

--

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