jantman / awslimitchecker

A script and python package to check your AWS service limits and usage via boto3.
http://awslimitchecker.readthedocs.org/
GNU Affero General Public License v3.0
515 stars 187 forks source link

Add support for some missing ELB limits #542

Open TagadaPoe opened 3 years ago

TagadaPoe commented 3 years ago

Feature Request

Feature Description

The following quotas regarding Application and Network Load Balancers could be added:

L-7E6692B2      Targets per Application Load Balancer
L-EEF1AD04      Targets per Network Load Balancer 
L-A0D0B863      Targets per Target Group per Region
L-B211E961      Targets per Availability Zone per Network Load Balancer

The applied quotas for these limits are available in the AWS Quotas APIs.

Testing Assistance

I will be able to assist in testing pre-release code for the feature.

TagadaPoe commented 3 years ago

I was looking at how to implement finding usage for these limits.

Currently the "Target groups" per-region usage is implemented, but not the "Targets per ..." usages.

Regarding the limits requested in this issue ("Targets per..."), this target number can be obtained only from the API call "describe_target_health", and that call would need to be done once per target group (the call returns all the current targets for a given target groups).

Just for information, an ALB has listeners, that reference Target Groups, et Targets are the EC2 instances that are currently part of a Target Group.

For infrastructures where the 1000-target limit may be reached, checking this usage could be useful.

But for infrastructures where there may be many target groups, this could be too many API calls, and increase the execution time of awslimitchecker.

I saw that it is possible to skip checks, but it is only a command-line option that is not passed to the Checker class, and it does not affect whether or not the usage is read from AWS.

Maybe it could be possible to disable reading a usage by default, and enabling it only when required ?