open-guides/og-aws

EC2 ELB: Verify DescribeTags Limit

Open

#596 opened on Mar 9, 2018

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Shell (36,412 stars) (3,905 forks)batch import
help wantedsec: EC2

Description

I stumbled upon this earlier today and unfortunately I lack the ALBs to validate it. Essentially it turns out that the DescribeTags API action has a hard limit of 20 LoadBalancers per request, the interesting bit is that this appears to only apply to Classic Load Balancers. First bit is that ALB and NLB follow 2015-12-01 API while CLB follows the 2012-06-01 API.

The 2012-06-01 API Specification for DescribeTags notes a limit of 20 load balancers: https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeTags.html

While the 2015-12-01 API Specification does not:

https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTags.html

I already confirmed the limit on CLB but I don't have over 20 ALBs running in a single region to test. I'm logging an issue in the hopes that some kind soul will stumble upon this and run the follow command to see if we encounter the same error with ALB:

aws elbv2 --region us-east-1 describe-tags --resource-arns $(aws --region us-east-1 elbv2 describe-load-balancers --query 'LoadBalancers[*].[LoadBalancerArn]' --max-items 21 --output text | tr "\n" " ")

That will simply get a list of 21 ALBs (1 over rumored limit of 20) and pass it to describe-tags. Should there not be an error then we've got a solid candidate for an og-aws gotcha.

Contributor guide