# CloudQuery AWS source plugin v23 update missing column information

**URL:** <https://community.cloudquery.io/t/cloudquery-aws-source-plugin-v23-update-missing-column-information/213>\
**Category:** CloudQuery Plugins\
**Created:** [May 14, 2024, 9:40am UTC](https://community.cloudquery.io/t/cloudquery-aws-source-plugin-v23-update-missing-column-information/213 "2024-05-14T09:40:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![credible-wasp](https://avatars.discourse-cdn.com/v4/letter/c/48db29/32.png) [@credible-wasp](https://community.cloudquery.io/u/credible-wasp)\
**Post date:** [May 14, 2024, 9:40am UTC](https://community.cloudquery.io/t/cloudquery-aws-source-plugin-v23-update-missing-column-information/213/1 "2024-05-14T09:40:12Z")

</div>

Hello team,

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:

```auto
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 very much.

---

<div class="post-metadata">

**Author:** ![kemal](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/kemal/32/42_2.png) [@kemal](https://community.cloudquery.io/u/kemal)\
**Post date:** [May 14, 2024, 9:46am UTC](https://community.cloudquery.io/t/cloudquery-aws-source-plugin-v23-update-missing-column-information/213/2 "2024-05-14T09:46:45Z")

</div>

Hi! The answer you’re looking for is in this cq-bot comment: [GitHub Comment](https://github.com/cloudquery/cloudquery/pull/15395#issuecomment-1819979428)

- Table `aws_s3_bucket_loggings` was added
- Table `aws_s3_bucket_ownership_controls` was added
- Table `aws_s3_bucket_policies` was added
- Table `aws_s3_bucket_public_access_blocks` was added
- Table `aws_s3_bucket_replications` was added
- Table `aws_s3_bucket_versionings` was added

So all of the removed columns were extracted into separate tables and you should be able to `JOIN` them to get the fields.

---

<div class="post-metadata">

**Author:** ![credible-wasp](https://avatars.discourse-cdn.com/v4/letter/c/48db29/32.png) [@credible-wasp](https://community.cloudquery.io/u/credible-wasp)\
**Post date:** [May 14, 2024, 10:03am UTC](https://community.cloudquery.io/t/cloudquery-aws-source-plugin-v23-update-missing-column-information/213/3 "2024-05-14T10:03:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kemal](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/kemal/32/42_2.png) [@kemal](https://community.cloudquery.io/u/kemal)\
**Post date:** [May 14, 2024, 10:05am UTC](https://community.cloudquery.io/t/cloudquery-aws-source-plugin-v23-update-missing-column-information/213/4 "2024-05-14T10:05:02Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![credible-wasp](https://avatars.discourse-cdn.com/v4/letter/c/48db29/32.png) [@credible-wasp](https://community.cloudquery.io/u/credible-wasp)\
**Post date:** [May 14, 2024, 11:20am UTC](https://community.cloudquery.io/t/cloudquery-aws-source-plugin-v23-update-missing-column-information/213/5 "2024-05-14T11:20:30Z")

</div>

Thank you, I will edit the query this way 😊  
@kemal Hi again Kemal Abi. 👋  
[https://github.com/cloudquery/cloudquery/pull/15400](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.

---

<div class="post-metadata">

**Author:** ![kemal](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/kemal/32/42_2.png) [@kemal](https://community.cloudquery.io/u/kemal)\
**Post date:** [May 14, 2024, 2:06pm UTC](https://community.cloudquery.io/t/cloudquery-aws-source-plugin-v23-update-missing-column-information/213/6 "2024-05-14T14:06:20Z")

</div>

JSON structures are directly as they come in from the AWS API. If you go here for the table: [CloudQuery AWS Table](https://hub.cloudquery.io/plugins/source/cloudquery/aws/v23.0.0/tables/aws_cloudtrail_trail_event_selectors) and click on the [docs.aws.amazon.com](https://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.

---

<div class="post-metadata">

**Author:** ![credible-wasp](https://avatars.discourse-cdn.com/v4/letter/c/48db29/32.png) [@credible-wasp](https://community.cloudquery.io/u/credible-wasp)\
**Post date:** [May 14, 2024, 2:38pm UTC](https://community.cloudquery.io/t/cloudquery-aws-source-plugin-v23-update-missing-column-information/213/7 "2024-05-14T14:38:44Z")

</div>

This is exactly what I needed, thank you for enlightening me, Kemal Abi 😊
