Created
April 25, 2016 13:14
-
-
Save niklasvincent/c2f9893f30a49a3b204acb38a4902e6d to your computer and use it in GitHub Desktop.
elb-connection-draining-status.sh
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
#!/bin/bash | |
PROFILE="${1}" | |
ELBS=$(aws --profile ${PROFILE} elb describe-load-balancers --page-size 100 | jq -r '.LoadBalancerDescriptions[].LoadBalancerName') | |
for ELB in ${ELBS}; do | |
CONNECTION_DRAINING=$(aws --profile ${PROFILE} elb describe-load-balancer-attributes --load-balancer-name ${ELB} | jq ".LoadBalancerAttributes.ConnectionDraining.Enabled") | |
printf "%-32s %s\n" $ELB $CONNECTION_DRAINING | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment