Open Ashex opened 6 years ago
@Ashex would you like to take a bash at adding something to reflect this?
@maishsk I can probably launch a bunch with terraform then try this, hopefully get to it within the next week but I can't make any promises.
Just stumbled upon this.. I've 33 ALBs and the command did give the error.
Removing --max-items
option gives the same error.
aws elbv2 --profile production --region us-east-1 describe-tags --resource-arns $(aws --profile production --region us-east-1 elbv2 describe-load-balancers --query 'LoadBalancers[*].[LoadBalancerArn]' --max-items 21 --output text | tr "\n" " ")
An error occurred (ValidationError) when calling the DescribeTags operation: Cannot have more than 20 resources described.
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.htmlWhile 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:
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.