Launch EC2 instances with 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

First install aws cli software into the system. In y case it is alredy installed. After installing type following command.

After installing AWS CLI we have to configure it. But for that we need the IAM user of the AWS. Using access key and secret key we can login.

It will show any ec2 instances available or not

Step 1: Create a key pair

Step 2: Create a security group

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

To see launched instance we have following command

Step 4: Create an EBS volume of 1 GB.

5. The final step is to attach the
above created EBS volume to the
instance

Now we can confirm the entire operation bt Web-UI

Conclusion: In this way, We can use CLI to launch the instances, create a key, create a security group, create storage, and attach that volume to ec2 instances.

A computer Engineer Student

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