-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#4990 clean up create and delete all PoC
- Loading branch information
matthew-a-dunlap
committed
Sep 11, 2018
1 parent
8db31c9
commit 9d04a2b
Showing
2 changed files
with
13 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
#This script gets all the instances from ec2 and sends terminate to them | ||
#Its pretty basic and probably shouldn't be trusted at this point. Namely: | ||
# - You can kill instances other people are using | ||
# - It will try to kill instances that are already dead, which makes output hard to read | ||
# - If it fails for some reason it's hard to tell the script didn't work right | ||
|
||
INSTANCES=$(aws ec2 describe-instances --query 'Reservations[].Instances[].[InstanceId]' --output text) | ||
|
||
aws ec2 terminate-instances --instance-ids $INSTANCES |