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

Cannot get actual value of EC2 type limit #424

Closed
JayeshThamke opened this issue Sep 5, 2019 · 4 comments
Closed

Cannot get actual value of EC2 type limit #424

JayeshThamke opened this issue Sep 5, 2019 · 4 comments

Comments

@JayeshThamke
Copy link

Source code

from awslimitchecker.checker import AwsLimitChecker
c = AwsLimitChecker()
c4_2xlarge = c.get_limits(['EC2'])["EC2"]['Running On-Demand c4.4xlarge instances']
print("limit: " + str(c4_2xlarge.get_limit()))

It returns the default AWS limit as 10 rather than actual limit 100 set in AWS EC2 Limits.
Is there a different API to call for actual EC2 type limit?
Thanks in advance,
Jayesh

@jantman
Copy link
Owner

jantman commented Sep 5, 2019

Jayesh,

Does your account have Trusted Advisor support?

Per the documentation on supported limits, AWS does not expose the Running On-Demand c4.4xlarge instances limit via any API, so if you don't have Trusted Advisor you'll need to manually tell awslimitchecker what your limit is if it's not the default.

Please see the documentation in Supported Limits and Overriding Limits.

@JayeshThamke
Copy link
Author

Dear Jason,
Thanks for reply,

Yes, Trusted Advisor enabled but nothing has been configured yet. I saw the documentation on supported limits by API as well as Trusted Limit.
There is also a trusted a awslimitchecker.trustedadvisor module, can it be helpful to get EC2 instance type's service limit? What methods should I invoke (_poll) ? And for EC2 types have no API and TA support (Running On-Demand c5.9xlarge instances) how to get their service limit?

Thanks,
Jayesh

@jantman
Copy link
Owner

jantman commented Sep 5, 2019

@JayeshThamke

No code other than awslimitchecker.checker.AwsLimitChecker should be called externally to the package. The trustedadvisor module is solely used internally by AwsLimitChecker.

For EC2 types that have no API and no TA support, there is currently no way to get the service limit programmatically. You need to manually tell awslimitchecker what the limit is; see the documentation on overriding limits via the CLI or via Python. This may change in the future with #413 .

If you need assistance troubleshooting the TA support, I'll need you to provide all of the information that was in the Issue Template that you deleted.

@jantman
Copy link
Owner

jantman commented Sep 18, 2019

No response in two weeks; closing. Please reopen this issue with the requested information if you have further questions.

@jantman jantman closed this as completed Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants