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.

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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ