AWS CLI Usage

  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.

AWS CLI Configure

aws configure

Creating Key Pair

aws ec2 create-key-pair --key-name <key-name>

Creating a Security Group

aws ec2 create-security-group --group-name <group-name>--description "<Description>" --vpc-id <vpc-id>

Launching Instance

aws ec2 run-instances --image-id <image-id> --instance-type <instance-type> --count <number-of-instances> --subnet-id <subnet-id> --security-group-ids <sg-id> --key-name <key-name>

Creating EBS Volume

Create EBS Volume and EC2 Instance in the same Availability Zone.

aws ec2 create-volume --availability-zone <availability-zone> --size <size> --volume-type <type>

Attaching the EBS Volume to the running instance

aws ec2 attach-volume --volume-id <volume-id>  --instance-id <instance-id> --device <device-name>

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Crash & Burn: Some tips to solve error H10 while deploying your app to Heroku

Adobe Flash Player For Chrome Mac Download

Coral Collector Flatiron Sinatra Project

SDN and SD-WAN probably won’t kill us all

How to communicate with the Cardano node on a remote host

10 Best Programming Languages For Web Development In 2022

Kubernetes as a Container Orchestrating tool

Salient Features of Odoo 15 for the Meat Processing Industry

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
Karan Agrawal

Karan Agrawal

More from Medium

Build your first IoT project using ESP8266 with AWS IoT Core Service |Amazon-Web-Services IoT Core…

Docker, how to start with it

Version Control with Git and GitHub

Introduction to Containerization