Hi Guys,
I am trying to build a solution to create a history of changes to the given resource. It seems that only aws_cloudtrail_events supports incremental changes. I was playing around with the write_mode feature of the Postgres destination, but append mode keeps creating the same records, and overwrite mode does not keep history.
Let me know if there is any recommended approach from CloudQuery to handle the deduplication process elegantly. I am using AWS ECS Fargate with EventBridge to schedule CloudQuery periodically to fetch AWS resource details into AWS Aurora Postgres.
To make use of incremental syncing you need to pass a state backend in the sync config. An example of this configuration is available in our docs: Managing Incremental Tables | CloudQuery. Are you setting the backend_options field? Can you share a redacted version of your config?
Thanks, Marcel. It worked for only the aws_cloudtrail_events table from the AWS plugin, but I am also looking for something similar for other tables from the AWS plugin. As per the plugin documentation, it only supports “aws_cloudtrail_events” as an incremental type; hence, we are trying to find a custom solution to achieve similar results for other tables from the AWS plugin.
Unless tables support incremental syncing there is no way to incrementally sync the data they expose. Not all AWS endpoints support querying by fields we’d need to make this work.
With write_mode: append for tables that are not incremental CloudQuery will resync all the records available in that table. You could use this to create data partitions that track the history of records that were synced.