简体   繁体   中英

AWS cli: How to stop instances and start EC2 instances

I want to start and stop EC2 instances using AWS-cli

How can i do this task.

I have setup aws cli on my pc.

Start an Amazon EC2 instance

Documentation: start-instances — AWS CLI Command Reference

aws ec2 start-instances --instance-ids i-xxx

Stop an Amazon EC2 instance

Documentation: stop-instances — AWS CLI Command Reference

aws ec2 stop-instances --instance-ids i-xxx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM