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