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
已提问 4 个月前242 查看次数
1 回答
2
已接受的回答

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
专家
已回答 4 个月前
profile picture
专家
已审核 4 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则