Home > Software engineering >  AWS cli: How to stop instances and start EC2 instances
AWS cli: How to stop instances and start EC2 instances

Time:11-18

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.

CodePudding user response:

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
  • Related