# Rate limiting issues with CloudQuery IAM service access

**URL:** <https://community.cloudquery.io/t/rate-limiting-issues-with-cloudquery-iam-service-access/548>\
**Category:** CloudQuery Plugins\
**Created:** [November 28, 2023, 8:07am UTC](https://community.cloudquery.io/t/rate-limiting-issues-with-cloudquery-iam-service-access/548 "2023-11-28T08:07:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![certain-alpaca](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@certain-alpaca](https://community.cloudquery.io/u/certain-alpaca)\
**Post date:** [November 28, 2023, 8:07am UTC](https://community.cloudquery.io/t/rate-limiting-issues-with-cloudquery-iam-service-access/548/1 "2023-11-28T08:07:23Z")

</div>

Hi all!

I’m facing some rate limiting issues while executing CloudQuery. The error I get is this one:

```auto
ERR table resolver finished with error error="operation error IAM: GenerateServiceLastAccessedDetails, exceeded maximum number of attempts, 10, https response error StatusCode: 400, RequestID: XXXXXXXXXXXXXXXXX, api error Throttling: Rate exceeded" client=XXXXXXXXXXXXX:us-east-1 module=aws-src table=aws_iam_role_last_accessed_details

```

Not sure how I can prevent this. I was adding more tables to the `aws.yml` file, so maybe the solution is to split the file into several ones and trigger CloudQuery several times, pointing to those “smaller” configuration files one after the other.

---

<div class="post-metadata">

**Author:** ![martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@martin](https://community.cloudquery.io/u/martin)\
**Post date:** [November 28, 2023, 9:25am UTC](https://community.cloudquery.io/t/rate-limiting-issues-with-cloudquery-iam-service-access/548/2 "2023-11-28T09:25:03Z")

</div>

👋 Hi Alex, there are a couple of things you can try to avoid the rate limiting:

1. As you suggested, you can try splitting the resources into different configurations and have them run on different schedules.
2. Try reducing the concurrency (see [AWS Concurrency Documentation](https://hub.cloudquery.io/plugins/source/cloudquery/aws/v22.19.2/docs#aws-spec)).
3. Finally, you could try using the `scheduler: shuffle` option to balance the load across API calls (see [Performance Tuning Documentation](https://docs.cloudquery.io/docs/advanced-topics/performance-tuning)).

I hope this helps!

---

<div class="post-metadata">

**Author:** ![certain-alpaca](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@certain-alpaca](https://community.cloudquery.io/u/certain-alpaca)\
**Post date:** [November 28, 2023, 9:36am UTC](https://community.cloudquery.io/t/rate-limiting-issues-with-cloudquery-iam-service-access/548/3 "2023-11-28T09:36:45Z")

</div>

Thank you very much for the tips! I’ll try that and check if it works better.

---

<div class="post-metadata">

**Author:** ![martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@martin](https://community.cloudquery.io/u/martin)\
**Post date:** [November 28, 2023, 2:05pm UTC](https://community.cloudquery.io/t/rate-limiting-issues-with-cloudquery-iam-service-access/548/4 "2023-11-28T14:05:22Z")

</div>

One further option is to consider skipping some of the tables that may be slowing the sync down or triggering the rate limit but aren’t actually useful to you - see this [link](https://hub.cloudquery.io/plugins/source/cloudquery/aws/v22.19.2/docs#skip-tables).

---

<div class="post-metadata">

**Author:** ![certain-alpaca](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@certain-alpaca](https://community.cloudquery.io/u/certain-alpaca)\
**Post date:** [November 28, 2023, 3:39pm UTC](https://community.cloudquery.io/t/rate-limiting-issues-with-cloudquery-iam-service-access/548/5 "2023-11-28T15:39:36Z")

</div>

In this case, I’d like to get the info from all tables, but thanks anyway for the tip.
