question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do you deal with "Rate exceeded"?

See original GitHub issue

Ask your question

I keep getting “Rate exceeded” when I perform Cloud Custodian scans using certain policies that make certain API calls to AWS. I am aware that this is an issue with AWS but do you have any workaround for this?

Policy

`policies:

  • name: iam-unused-creds-audit resource: iam-user comment: | Ensure credentials unused for 90 days or greater are disabled filters:
    • and:
      • type: credential key: password_enabled value: true
      • type: credential key: password_last_used value_type: age value: 90 op: gt
      • type: credential key: access_keys.active value: true
      • type: credential key: access_keys.last_used_date value_type: age value: 90 op: gt actions:
    • type: notify`

Relevant log/traceback output

2022-05-17 20:58:30,617: c7n_org:ERROR Exception running policy:iam-unused-creds-audit account:users region:eu-west-1 error:An error occurred (Throttling) when calling the GetCredentialReport operation (reached max retries: 4): Rate exceeded
2022-05-17 20:58:32,207: c7n_org:ERROR Exception running policy:iam-unused-creds-audit account:users region:eu-west-2 error:An error occurred (Throttling) when calling the GetCredentialReport operation (reached max retries: 4): Rate exceeded
2022-05-17 20:58:33,727: c7n_org:ERROR Exception running policy:iam-unused-creds-audit account:users region:ca-central-1 error:An error occurred (Throttling) when calling the GetCredentialReport operation (reached max retries: 4): Rate exceeded
2022-05-17 20:58:34,620: c7n_org:ERROR Exception running policy:iam-unused-creds-audit account:users region:ap-south-1 error:An error occurred (Throttling) when calling the GetCredentialReport operation (reached max retries: 4): Rate exceeded
2022-05-17 20:58:36,090: c7n_org:ERROR Exception running policy:iam-unused-creds-audit account:users region:sa-east-1 error:An error occurred (Throttling) when calling the GetCredentialReport operation (reached max retries: 4): Rate exceeded
2022-05-17 20:58:36,183: c7n_org:ERROR Exception running policy:iam-unused-creds-audit account:users region:ap-northeast-3 error:An error occurred (Throttling) when calling the GetCredentialReport operation (reached max retries: 4): Rate exceeded
2022-05-17 20:58:37,540: c7n_org:ERROR Exception running policy:iam-unused-creds-audit account:users region:ap-northeast-1 error:An error occurred (Throttling) when calling the GetCredentialReport operation (reached max retries: 4): Rate exceeded
2022-05-17 20:58:41,124: c7n_org:ERROR Exception running policy:iam-unused-creds-audit account:users region:ap-northeast-2 error:An error occurred (Throttling) when calling the GetCredentialReport operation (reached max retries: 4): Rate exceeded
2022-05-17 20:58:41,307: c7n_org:ERROR Exception running policy:iam-unused-creds-audit account:users region:ap-southeast-2 error:An error occurred (Throttling) when calling the GetCredentialReport operation (reached max retries: 4): Rate exceeded
2022-05-17 20:58:42,168: c7n_org:ERROR Exception running policy:iam-unused-creds-audit account:users region:eu-central-1 error:An error occurred (Throttling) when calling the GetCredentialReport operation (reached max retries: 4): Rate exceeded
2022-05-17 20:58:44,049: c7n_org:ERROR Exception running policy:iam-unused-creds-audit account:users region:ap-southeast-1 error:An error occurred (Throttling) when calling the GetCredentialReport operation (reached max retries: 4): Rate exceeded
2022-05-17 20:58:44,160: c7n_org:ERROR Exception running policy:iam-unused-creds-audit account:users region:us-east-2 error:An error occurred (Throttling) when calling the GetCredentialReport operation (reached max retries: 4): Rate exceeded

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ajkerrigancommented, May 17, 2022

The -r all will tell c7n-org to start running your set of policies across all regions. Then at runtime, custodian will skip the IAM and S3 policies outside us-east-1.

0reactions
haiauthcommented, May 17, 2022

So if I specify the condition in all of my IAM and S3 policies and I run them with c7n-org run -s output -u policies -r all --cache-period 0. What would happen? Will the -r all override the condition or Custodian will just skip all the regions and scan only us-east-1 as specified by the condition?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Find the AWS API call causing "Rate exceeded" errors
To determine which API call is causing a Rate exceeded error in your AWS account, do the following: 1. Create an Amazon Athena...
Read more >
What does "rate limit exceeded" mean? (UPDATED)
If you use up your 100 API calls in the hour then you will see the “rate limit exceeded” message in TweetDeck and...
Read more >
What to do when you are being rate limited
If you receive an error message like “API rate limit exceeded” or “You are being rate limited”, that is the website telling you...
Read more >
why i am getting rate exceeded error - Google Groups
The RateExceededError is experienced when there are too many requests made to the API in a short period of time.
Read more >
How can I find which API call is causing the "Rate exceeded ...
Transcript · What is AWS CloudWatch? · What is Lambda Throttling? (and how to fix it!) · What is Rate Limiting / API...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found