Created
August 26, 2016 00:40
-
-
Save nshenry03/abd0adfb498abeaf281b750611a61fc9 to your computer and use it in GitHub Desktop.
These are the load balancers in prod that only have 1 or 2 instances in them (where at least 1 of the instances is app01, app02, or app03
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
aws elb describe-load-balancers --profile prod | \ | |
jq '.LoadBalancerDescriptions[] | \ | |
select(\ | |
(\ | |
(.Instances[] | .InstanceId == "i-1b5a85f7") or \ | |
(.Instances[] | .InstanceId == "i-e3663209") or \ | |
(.Instances[] | .InstanceId == "i-1c5a85f0")) \ | |
and (.Instances | length <= 2)\ | |
) | \ | |
.LoadBalancerName' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment