How to Stop an EC2 Instance

Login to AWS Management Console and navigate to EC2 dashboard. Search for the instance that you would like to stop and right click on the instance. Select ‘Stop’ under ‘Instance State’.

On the ‘Stop Instances’ window, confirm by choosing ‘Yes, Stop’.

To stop an EC2 Instance from AWS CLI, run the following command where INSTANCEID is the instance id of the EC2 Instance.

aws ec2 stop-instances --instance-ids INSTANCEID

Below is the command to stop multiple instances using AWS CLI.

aws ec2 stop-instances --instance-ids INSTANCEID1 INSTANCEID2 INSTANCEID3

See also  How to host a static website using Amazon S3