Created
April 12, 2019 17:41
-
-
Save cayblood/b47ac13a32a6828608c746c2eafc4810 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
INSTANCE_ID=$(aws ec2 describe-instances | jq -r '.Reservations[].Instances[] | {id: .InstanceId, name: .Tags[] | select(.Key == "Name") | .Value} | select(.name == "carl-development") | .id') | |
aws ec2 start-instances --instance-ids "$INSTANCE_ID" |
This file contains hidden or 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
#!/bin/bash | |
INSTANCE_ID=$(aws ec2 describe-instances | jq -r '.Reservations[].Instances[] | {id: .InstanceId, name: .Tags[] | select(.Key == "Name") | .Value} | select(.name == "carl-development") | .id') | |
aws ec2 stop-instances --instance-ids "$INSTANCE_ID" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment