AWS athena documentation change
Summary
Added CTAS support documentation for S3 Tables, including security requirements for Lake Formation permissions.
Security assessment
Mentions required Lake Formation permissions for CTAS operations but does not address a specific security vulnerability. The change primarily documents feature usage with security best practices.
Diff
diff --git a/athena/latest/ug/gdc-register-s3-table-bucket-cat.md b/athena/latest/ug/gdc-register-s3-table-bucket-cat.md index 90589c5e9..70c2efe36 100644 --- a//athena/latest/ug/gdc-register-s3-table-bucket-cat.md +++ b//athena/latest/ug/gdc-register-s3-table-bucket-cat.md @@ -5 +5 @@ -Considerations and limitationsQuery S3 Tables from Athena Create S3 Tables in AthenaRegister S3 table bucket catalogs as Athena data sources +Considerations and limitationsQuery S3 Tables from Athena Create S3 Tables in AthenaRegister S3 table bucket catalogs as Athena data sourcesCTAS for S3 Tables @@ -17,2 +16,0 @@ Amazon S3 table buckets are a bucket type in Amazon S3 that is purpose-built to - * `CREATE TABLE AS SELECT` (CTAS) – You can still perform a `CREATE TABLE` DDL and then run `INSERT INTO `<s3_table>` SELECT * FROM `source_table`` to seed an S3 Table from an existing table. - @@ -245,3 +243 @@ Athena supports creating tables in existing S3 Table namespaces or namespaces cr -###### Note - -`TBLPROPERTIES` is optional and you are not required to set the table type as `Iceberg` when you create a table in a S3 Table namespace. +You can also create S3 Tables using CREATE TABLE AS SELECT (CTAS) statements. For more information, see CTAS for S3 Tables. @@ -279,0 +276,33 @@ To register S3 table bucket catalogs with the Athena console, perform the follow +## CTAS for S3 Tables + +Amazon Athena now supports CREATE TABLE AS SELECT (CTAS) operations for S3 Tables. This feature enables you to create new S3 Tables based on the results of a SELECT query. + +When creating a CTAS query for an S3 Table, there are a few important differences compared to standard Athena tables: + + * You must omit the location property because S3 Tables automatically manage their own storage locations. + + * The `table_type` property defaults to `ICEBERG`, so you don't need to explicitly specify it in your query. + + * If you don't specify a format, the system automatically uses `PARQUET` as the default format for your data. + + * All other properties follow the same syntax as regular Iceberg tables. + + + + +Before you create S3 Tables using CTAS, ensure that you have the necessary permissions configured in AWS Lake Formation. Specifically, you need permissions to create tables in the S3 Tables catalog. Without these permissions, your CTAS operations will fail. + +###### Note + +If your CTAS query fails, you might have to delete your table using the [S3 Tables API](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-delete.html) before attempting to re-run your query. you cannot use the Athena `DROP TABLE` statements to remove the table that was partially created by the query. + +**Example** + + + CREATE TABLE "s3tablescatalog/amzn-s3-demo-bucket"."namespace"."s3-table-name" + WITH ( + format = 'PARQUET' + ) + AS SELECT * + FROM source_table; +