Here,we will study how we can use AWS tools/services using Command Prompt/Command Line .In order to run AWS command on CLI we need to install an application on Windows called as “AWSCLIV2.msi”.Link

Then,to check whether it is installed or not, use the command-: “aws” in CLI.

  • >To login to AWS Console as an IAM user, use the command- “aws configure” .Then, Enter your credentials such as AWS Access Key ID and Secret Access Key.After that select the region name (by default it takes ap-south-1) and then Select output format which is by default JSON.
  • > To create a key-pair, we can use the command-: “aws ec2 create-key-pair --key-name <name>”.
  • >Now,if you want to create a Security Group,you can use the command:- “aws ec2 create-security-group --group-name< name> -- description< “ “>”. You can also use option called “--tag-specification” to assign tags to your Security Group and --vpc-id<ID> to create vpc id of security group .
  • >If you want to launch a new instance, then use the command-: “aws ec2 run-instances --image-id<ami-….> --instance-type<t2. ….> --count<no. of instances> --subnet-id<subnet- …> --security-group-ids<sg- …> --key-name <key-pair_name>”. If you don’t specify storage,it is by default considered as 8 GiB size.
  • >To create an EBS Volume,we have a command called -: “aws ec2 create-volume --availability-zone <zone> --size<(in GiB)>.Volume type is by default selected as “gp-2” if not specified.
  • > To attach the above created volume to an instance, we use command-: “aws ec2 attach-volume --instance-id<i- …> --volume-id<vol- …> --device<device_name>”.




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

Recommended from Medium

Fixed — Google playstore Errors on LG L70 D320N

Google playstore Error

Introducing Kate Westbrook, Full Stack Software Developer

A photo of Kate Westbrook, framed by a blue border with green and pink geometric shapes

How to setup Django postgresql heroku database

The Hub is now based on Caddy Web Server

A Decentral Social Marketplace based on IOTA

How to StackOverflow

ERROR: 2002 (HY000): Can’t connect to local MySQL server

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
Aditya Pande

Aditya Pande

More from Medium

Create secured connection via ssh to AWS Lightsail instance

Develop INSIDE a Container!

Setting up CI/CD with AWS CodePipeline

Guide to 5 best practices on AWS Cloud for cost optimization