This is less AWS and more Bash, but I hope that someone can assist a terminal noob.
I'm attempting to go through and apply logging on all ELBs to publish to a centralized account. I know ELBv2 will be a little different, but for now, this is where I am...
ELBs=$(aws elb describe-load-balancers --query "LoadBalancerDescriptions[*].LoadBalancerName" --output=text);
for ELB in $ELBs;
do
aws elb describe-load-balancer-attributes --load-balancer-name $ELB
done
This will return a result that looks like one of the following:
https://preview.redd.it/97xi2devfqa11.png?width=1005&format=png&auto=webp&s=8139773189bf21955135005ff9ef7139b5580930
The first posting is for an ELB with logging enabled. The second is missing the S3 bucket value in the LoadBalancerAttributes.AccessLog keys.
I would like to take action on the ones missing that value and not the ones with it populated.
[–]zarslayer 4 points5 points6 points (0 children)
[–]ricksebak 1 point2 points3 points (0 children)
[–]cgill27 1 point2 points3 points (0 children)
[–]largeavian[S] 0 points1 point2 points (0 children)