Skip to content

Instantly share code, notes, and snippets.

@lsauer
Created September 10, 2017 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lsauer/0b55a462a6275a0aed268d7a789b7e82 to your computer and use it in GitHub Desktop.
Save lsauer/0b55a462a6275a0aed268d7a789b7e82 to your computer and use it in GitHub Desktop.
Amazon AWS Shut Down All EC2 Instances
aws ec2 terminate-instances
--instance-ids
$(
aws ec2 describe-instances
| grep InstanceId
| awk {'print $2'}
| sed 's/[",]//g'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment