# How does incremental syncing work with CloudQuery from aws to postgres

**URL:** <https://community.cloudquery.io/t/how-does-incremental-syncing-work-with-cloudquery-from-aws-to-postgres/420>\
**Category:** CloudQuery Plugins\
**Created:** [January 31, 2024, 8:03pm UTC](https://community.cloudquery.io/t/how-does-incremental-syncing-work-with-cloudquery-from-aws-to-postgres/420 "2024-01-31T20:03:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![comic-firefly](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@comic-firefly](https://community.cloudquery.io/u/comic-firefly)\
**Post date:** [January 31, 2024, 8:03pm UTC](https://community.cloudquery.io/t/how-does-incremental-syncing-work-with-cloudquery-from-aws-to-postgres/420/1 "2024-01-31T20:03:28Z")

</div>

Hello, how does incremental syncing work? I’m syncing from `source:aws` to `destination:postgres`.

---

<div class="post-metadata">

**Author:** ![ben](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/ben/32/88_2.png) [@ben](https://community.cloudquery.io/u/ben)\
**Post date:** [January 31, 2024, 8:05pm UTC](https://community.cloudquery.io/t/how-does-incremental-syncing-work-with-cloudquery-from-aws-to-postgres/420/2 "2024-01-31T20:05:04Z")

</div>

Incremental syncing uses a state table in the destination to store some type of state that the table can use as a starting point or checkpoint for syncing.

---

<div class="post-metadata">

**Author:** ![comic-firefly](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@comic-firefly](https://community.cloudquery.io/u/comic-firefly)\
**Post date:** [January 31, 2024, 8:05pm UTC](https://community.cloudquery.io/t/how-does-incremental-syncing-work-with-cloudquery-from-aws-to-postgres/420/3 "2024-01-31T20:05:25Z")

</div>

I should have mentioned that I _did_ set that up.  
I see the table is created but it’s always empty.

```auto
Migrating table module=pg-dest table=cq_state_aws
Table exists, auto-migrating module=pg-dest table=cq_state_aws
Connected to state backend module=aws-src table_name=cq_state_aws

```

---

<div class="post-metadata">

**Author:** ![ben](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/ben/32/88_2.png) [@ben](https://community.cloudquery.io/u/ben)\
**Post date:** [January 31, 2024, 8:08pm UTC](https://community.cloudquery.io/t/how-does-incremental-syncing-work-with-cloudquery-from-aws-to-postgres/420/4 "2024-01-31T20:08:34Z")

</div>

Ahh, incremental syncs are only supported on specific tables (usually high volume APIs)… For the AWS plugin, I think the only table that supports incremental sync is `aws_cloudtrail_events`.

But let me verify that.

---

<div class="post-metadata">

**Author:** ![ben](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/ben/32/88_2.png) [@ben](https://community.cloudquery.io/u/ben)\
**Post date:** [January 31, 2024, 8:09pm UTC](https://community.cloudquery.io/t/how-does-incremental-syncing-work-with-cloudquery-from-aws-to-postgres/420/5 "2024-01-31T20:09:08Z")

</div>

Are there any tables that you would like to see support incremental sync?

---

<div class="post-metadata">

**Author:** ![comic-firefly](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@comic-firefly](https://community.cloudquery.io/u/comic-firefly)\
**Post date:** [January 31, 2024, 8:10pm UTC](https://community.cloudquery.io/t/how-does-incremental-syncing-work-with-cloudquery-from-aws-to-postgres/420/6 "2024-01-31T20:10:02Z")

</div>

So I see an issue was raised, here: [https://github.com/cloudquery/cloudquery/issues/7286](https://github.com/cloudquery/cloudquery/issues/7286).

But essentially, we are syncing data from a bunch of accounts across different organizations. Some accounts may contain many types of certain resources versus others. I guess the idea of using incremental sync could help with load on the database.

---

<div class="post-metadata">

**Author:** ![ben](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/ben/32/88_2.png) [@ben](https://community.cloudquery.io/u/ben)\
**Post date:** [January 31, 2024, 8:14pm UTC](https://community.cloudquery.io/t/how-does-incremental-syncing-work-with-cloudquery-from-aws-to-postgres/420/7 "2024-01-31T20:14:14Z")

</div>

If you are looking for ways of reducing load on the DB or just improve performance in general, I would be happy to set up a call to discuss your workload and what we have seen work at other large AWS deployments.

Sent you a DM.
