Amazon Web Services(AWS) is a cloud service from
Amazon, which provides services in the form of building blocks, these building
blocks can be used to create and deploy any type of application in the cloud.
It is a comprehensive, easy to
use computing platform. The platform is developed with a combination of
infrastructure as a service (IaaS), platform as a service (PaaS) and packaged
software as a service (SaaS) offerings
Please refer this article to understand in detail about AWS.
In this article, we will be learning some of the most useful AWS EC2 CLI Commands.
Purpose
|
Commands
|
To start an AWS
instance
|
aws ec2 start-instances --instance-ids
|
To view the status of
instance
|
aws ec2 describe-instances
|
To stop an AWS
instance
|
aws ec2 stop-instances --instance-ids
|
To terminate an AWS
instance
|
aws ec2 terminate-instances --instance-ids
|
To display the subset of all available ec2 images
|
aws ec2
describe-images | grep ubuntu
|
To List user in different
format
|
aws iam list-users
–output table
|
To add storage to an
instance
|
aws ec2 describe-volumes
|
To Reboot an AWS
instance
|
aws ec2 reboot-instances --instance-ids
|
To change an AWS
instance type
|
aws ec2 describe-instances
|
To Create New image
|
aws ec2 create-image --instance-id
|
To Delete an image
|
aws ec2 deregister-image --image-id
|
To Delete an snapshot
of image
|
aws ec2 delete-snapshot --snapshot-id
|
To get an system log
|
aws ec2
get-console-output --instance-id
|