Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws - account request-limit-increase can be raised but the increase may be below threshold #4587

Open
nitrocode opened this issue Aug 12, 2019 · 0 comments

Comments

@nitrocode
Copy link
Contributor

policy

policies:
  - name: account-service-limits
    resource: account
    filters:
      - type: service-limit
        threshold: 50
    actions:
      - type: request-limit-increase
        percent-increase: 25

For example I originally had 351/400 active load balancers which is 88% usage so this was created to raise it to 500

Increase Active load balancers by 100 in us-east-1 
	 Current Limit: 400
	 Current Usage: 351
	 Set New Limit to: 500

Now this was an increase of 25% as expected but this increase drops me only down to 70% usage which then creates another request

Increase Active load balancers by 125 in us-east-1 
	 Current Limit: 500
	 Current Usage: 351
	 Set New Limit to: 625

which drops me to 56% but I'm still over my threshold so it creates a final one to increase it to 781.

Instead of percent-increase, how about an acceptable-threshold so my original policy, would know to set the new limit to 781 instead of incrementally from 400 to 500 to 625 and finally to 781. We can do this by calculating...

>>> threshold = 0.5
>>> current = 351
>>> current_limit = 400
>>> threshold = 0.5
>>> increase = 0.25
>>> current = 351
>>> current_limit = 400
>>> new_limit = current_limit * (1 + increase)
>>> while current / new_limit > threshold:
...   new_limit = new_limit * (1 + increase)
...
>>> new_limit
781.25
@kapilt kapilt changed the title account request-limit-increase can be raised but the increase may be below threshold aws - account request-limit-increase can be raised but the increase may be below threshold Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants