I have a question about the CloudQuery AWS source plugin v23.0.0 update.
We were using the AWS source plugin version 22 and now we want to upgrade, but we are having difficulties due to insufficient information about the change of table structures.
With the v23.0.0 plugin update, the data in the aws_s3_buckets table was reduced from 23 columns to 11 columns and we could not find where the block_public_acls, block_public_policy, ignore_public_acls, and restrict_public_buckets columns we need were moved.
When we examined the changelogs, we found nothing but the following explanation:
v23.0.0
⚠ BREAKING CHANGES
Refactor aws_s3_buckets to use nested tables rather than that column resolvers (#15395)
From which table can we find these values for each of our AWS buckets? Or did you decide to delete these columns?
Thank you, I understand you, Kemal Abi. However, when I examined the columns of the newly added tables you showed here one by one, I still could not find a table with block_public_acls, block_public_policy, ignore_public_acls, restrict_public_buckets data. That’s why I already applied to your Discord channel.
LinkedIn’den bağlantı isteği atmıştım ama gözünden kaçtı herhalde abi. Takip ediyorum çalışmalarını, kolay gelsin, İngiltere’ye selamlar.
Let me take a look at the table definitions and get back to you. Those columns were moved to the aws_s3_bucket_public_access_blocks table, but they are inside the public_access_block_configuration JSON object and not separate columns.
To convert your query to the new version, you need to left join using bucket_arn (if there is no PublicAccessBlock set in a bucket, there won’t be a row in the aws_s3_bucket_public_access_blocks table).
Thank you, I will edit the query this way @kemal Hi again Kemal Abi. https://github.com/cloudquery/cloudquery/pull/15400
Again, I found this merge about aws_cloudtrail_trail_event_selectors table change in version v23.0.0, but I couldn’t find where the read_write_type and include_management_events columns were moved.
I tried to look inside the advanced_event_selectors and event_selectors JSON columns newly added to this table, but I got stuck because I don’t know the JSON structures.
Is there a page that describes the structures of JSON columns in CloudQuery tables?
If not, can you tell me where I can find the read_write_type and include_management_events columns removed from aws_cloudtrail_trail_event_selectors table?
Thank you.
JSON structures are directly as they come in from the AWS API. If you go here for the table: CloudQuery AWS Table and click on the docs.aws.amazon.com link, it should take you to the API page.
EventSelectors is the key under the event_selectors column, which has an array of each selector separately. To update an older query, you might need to use UNNEST() (this is for PostgreSQL) like functionality to create multiple rows for each of the array elements.