Home:ALL Converter>AWS CLI Windows Command to Terminate All EC2 Instances

AWS CLI Windows Command to Terminate All EC2 Instances

Ask Time:2018-06-08T22:14:10         Author:mark18

Json Formatter

I need a single Windows CMD command that terminate all instances from Ohio region. I found this commands but its not working.

aws ec2 terminate-instances \
    --region us-east-2 \
    --instance-ids (aws ec2 describe-instances --query "Reservations[].Instances[].[InstanceId]" --region us-east-2)

Author:mark18,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/50762597/aws-cli-windows-command-to-terminate-all-ec2-instances
yy