Last active
November 13, 2015 18:58
-
-
Save davecowart/64dd5e187257f3d35c8c to your computer and use it in GitHub Desktop.
ec2-search
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
davec@Busters ~ | |
% which ec2-rdp !10511 | |
ec2-rdp () { | |
~/ec2-search.sh $1 $2 | xargs ~/rdp.sh | |
} | |
davec@Busters ~ | |
% cat ec2-search.sh !10512 | |
#!/bin/bash | |
environment=$1 | |
instance_purpose=$2 | |
aws ec2 describe-instances --filters "Name=tag:environment,Values=$environment" "Name=tag:instance-purpose,Values=$instance_purpose" --query "Reservations[0].Instances[0].InstanceId" |
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
ec2-rdp tycheuat NotificationService-background-worker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment