Is there a way to start and stop instances from the command line through awscli?

0

I was wondering if there was a specific aws <command> that I can run from the terminal.

profile picture
asked 3 months ago236 views
1 Answer
2
Accepted Answer

There sure is. Here’s stop

https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/stop-instances.html

Example

aws ec2 stop-instances \
    --instance-ids i-1234567890abcdef0

And here’s start

https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/start-instances.html

Example

aws ec2 start-instances \
    --instance-ids i-1234567890abcdef0
profile picture
EXPERT
answered 3 months ago
profile picture
EXPERT
reviewed 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions