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 réponse
2
Réponse acceptée

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
répondu il y a 4 mois
profile picture
EXPERT
vérifié il y a 4 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions