Closed charleshepner closed 2 years ago
@charleshepner Thanks for opening this PR. Unfortunately the service code you are referencing does not exist for my AWS account:
...
botocore.errorfactory.NoSuchResourceException: An error occurred (NoSuchResourceException) when calling the GetServiceQuota operation:
...
botocore.errorfactory.NoSuchResourceException: An error occurred (NoSuchResourceException) when calling the GetAWSDefaultServiceQuota operation: The request failed because the specified service does not exist.
Did you request a quota increase for the number of roles in your AWS account?
We had 835 roles out of 1000 in our prod account, so the AWS console was warning us, which was what led me to create this check. Here are some screenshots from two of our accounts:
nonprod
prod
I did ask for a quota increase to 2000 for our prod account. It looks as if our nonprod account has an increase applied as well, but that must have been some time ago since I don't recall submitting a ticket for that.
Yeah so it seems like these limits are only available after a quota increase. I'm OK with returning the default value of 1000 if getting the limit returns a botocore.errorfactory.NoSuchResourceException
. Do you want to implement this behavior?
Yep, sure thing.
Check for the number of IAM roles in an account.
Fixes #22