背景・目的
少し前に、S3 Tablesの発表がありましたので内容を整理し、簡単に試してみます。
まとめ
下記に特徴をまとめます。
特徴 | 説明 |
---|---|
S3 Tablesとは | 分析ワークロードに最適化されたS3ストレージ 下記の特徴がある ・クエリパフォーマンスを向上 テーブルのストレージコストを削減する |
Purpose-built storage for tables | ・S3 table bucketsはテーブル専用に設計されている ・S3 汎用バケット内のセルフマネージド テーブルと比較して、1 秒あたりのトランザクション数 (TPS) が高く、クエリ スループットも優れている ・他の Amazon S3 バケットタイプと同じ耐久性、可用性、スケーラビリティを提供 |
Built-in support for Apache Iceberg | ・table bucketsは、Iceberg formatで保存される IcebergをサポートするSQLでクエリできる |
Icebergの特徴 | ・schema evolutionやpartition evolutionなど、クエリ パフォーマンスを最適化するためのさまざまな機能がある ・クエリを書き直したりデータ構造を再構築したりすることなく、時間の経過とともに進化できるようにデータの編成方法を変更できる ・Iceberg は、トランザクションのサポートを通じてデータの一貫性と信頼性を確保するように設計されている ・問題を修正したり、タイムトラベルクエリを実行したりするために、時間の経過に伴うデータの変化を追跡し、履歴バージョンにロールバックすることができる |
Automated table optimization | ・クエリ用にテーブルを最適化するために、S3 は圧縮、スナップショット管理、参照されていないファイルの削除などの自動メンテナンス操作を継続的に実行する。これらの操作により、小さなオブジェクトが少数の大きなファイルに圧縮され、テーブルのパフォーマンスが向上する ・メンテナンス操作により、未使用のオブジェクトがクリーンアップされ、ストレージ コストも削減される。この自動メンテナンスにより、手動でのテーブルメンテナンスの必要性が減り、大規模なデータレイクの運用が簡素化される ・各テーブルおよびテーブル バケットごとに、メンテナンス構成をカスタマイズできる |
Access management and security | IAMとOrganizationsのSCPでテーブルバケット、ここのテーブルの両方へのアクセスを管理できる ・S3 テーブルは、Amazon S3 とは異なるサービス名前空間を使用する(s3tables 名前空間を使用する) ・S3 テーブル サービスとそのリソース専用のポリシーを設計できる ・個々のテーブル、テーブル名前空間内のすべてのテーブル、またはテーブル バケット全体へのアクセスを許可するポリシーを設計できる ・すべての Amazon S3 ブロックパブリックアクセス設定はテーブルバケットに対して常に有効になっており、無効できない |
Integration with AWS analytics services | ・S3 コンソールを通じて、テーブル バケットを AWS 分析サービスと自動的に統合できる この統合により、テーブルが AWS Glue データカタログに追加され、Amazon Athena、Amazon Redshift、Amazon QuickSight などの分析サービスを使用してテーブルを操作できるようになる |
S3 Tablesの料金 | 下記に対して料金がかかる。 ・ストレージ料金 ・テーブルリクエスト料金 ・メンテナンス料金 |
概要
下記を基に整理します。
Amazon S3 Tables provide S3 storage that’s optimized for analytics workloads, with features designed to continuously improve query performance and reduce storage costs for tables. S3 Tables are purpose-built for storing tabular data, such as daily purchase transactions, streaming sensor data, or ad impressions. Tabular data represents data in columns and rows, like in a database table.
- S3 Tablesは、分析ワークロードに最適化されたS3ストレージを提供
- 下記の特徴がある
- クエリパフォーマンスを向上
- テーブルのストレージコストを削減する
- 下記のような表形式データを格納するために特別に構築されている
- 毎日の購入トランザクション
- ストリーミング センサー データ
- 広告インプレッションなど
The data in S3 Tables is stored in a new bucket type: a table bucket, which stores tables as subresources. Table buckets support storing tables in the Apache Iceberg format. Using standard SQL statements, you can query your tables with query engines that support Iceberg, such as Amazon Athena, Amazon Redshift, and Apache Spark.
- S3テーブルのデータは新しいバケットタイプに保存される
- テーブルをサブリソースとして保存するテーブル バケット
- テーブル バケットは、Apache Iceberg 形式でのテーブルの保存をサポート
- 標準の SQL ステートメントを使用して、Athena、Redshift、Spark などの Iceberg をサポートするクエリ エンジンでテーブルをクエリできる
Features of S3 Tables
Purpose-built storage for tables
S3 table buckets are specifically designed for tables. Table buckets provide higher transactions per second (TPS) and better query throughput compared to self-managed tables in S3 general purpose buckets. Table buckets deliver the same durability, availability, and scalability as other Amazon S3 bucket types.
- S3 table bucketsはテーブル専用に設計されている
- S3 汎用バケット内のセルフマネージド テーブルと比較して、1 秒あたりのトランザクション数 (TPS) が高く、クエリ スループットも優れている
- 他の Amazon S3 バケットタイプと同じ耐久性、可用性、スケーラビリティを提供
Built-in support for Apache Iceberg
Tables in your table buckets are stored in Apache Iceberg format. You can query these tables using standard SQL in query engines that support Iceberg. Iceberg has a variety of features to optimize query performance, including schema evolution and partition evolution.
- table bucketsは、Iceberg formatで保存される
- IcebergをサポートするSQLでクエリできる
- Iceberg には、schema evolutionやpartition evolutionなど、クエリ パフォーマンスを最適化するためのさまざまな機能がある
With Iceberg, you can change how your data is organized so that it can evolve over time without requiring you to rewrite your queries or rebuild your data structures. Iceberg is designed to help ensure data consistency and reliability through its support for transactions. To help you correct issues or perform time travel queries, you can track how data changes over time and roll back to historical versions.
- Iceberg を使用すると、クエリを書き直したりデータ構造を再構築したりすることなく、時間の経過とともに進化できるようにデータの編成方法を変更できる
- Iceberg は、トランザクションのサポートを通じてデータの一貫性と信頼性を確保するように設計されている
- 問題を修正したり、タイムトラベルクエリを実行したりするために、時間の経過に伴うデータの変化を追跡し、履歴バージョンにロールバックすることができる
Automated table optimization
To optimize your tables for querying, S3 continuously performs automatic maintenance operations, such as compaction, snapshot management, and unreferenced file removal. These operations increase table performance by compacting smaller objects into fewer, larger files. Maintenance operations also reduce your storage costs by cleaning up unused objects. This automated maintenance simplifies the operation of data lakes at scale by reducing the need for manual table maintenance. For each table and table bucket, you can customize maintenance configurations.
- クエリ用にテーブルを最適化するために、S3 は圧縮、スナップショット管理、参照されていないファイルの削除などの自動メンテナンス操作を継続的に実行する
- これらの操作により、小さなオブジェクトが少数の大きなファイルに圧縮され、テーブルのパフォーマンスが向上する
- メンテナンス操作により、未使用のオブジェクトがクリーンアップされ、ストレージ コストも削減される
- この自動メンテナンスにより、手動でのテーブルメンテナンスの必要性が減り、大規模なデータレイクの運用が簡素化される
- 各テーブルおよびテーブル バケットごとに、メンテナンス構成をカスタマイズできる
Access management and security
You can manage access for both table buckets and individual tables with AWS Identity and Access Management (IAM) and Service Control Policies in AWS Organizations. S3 Tables uses a different service namespace than Amazon S3: the s3tables namespace. Therefore, you can design policies specifically for the S3 Tables service and its resources. You can design policies to grant access to individual tables, all tables within a table namespace, or entire table buckets. All Amazon S3 Block Public Access settings are always enabled for table buckets and cannot be disabled.
- IAMとOrganizationsのSCPでテーブルバケット、ここのテーブルの両方へのアクセスを管理できる
- S3 テーブルは、Amazon S3 とは異なるサービス名前空間を使用する(s3tables 名前空間を使用する)
- S3 テーブル サービスとそのリソース専用のポリシーを設計できる
- 個々のテーブル、テーブル名前空間内のすべてのテーブル、またはテーブル バケット全体へのアクセスを許可するポリシーを設計できる
- すべての Amazon S3 ブロックパブリックアクセス設定はテーブルバケットに対して常に有効になっており、無効できない
Integration with AWS analytics services
You can automatically integrate your table buckets with AWS analytics services through the S3 console. The integration adds your tables to the AWS Glue Data Catalog so that you can work with them using analytics services such as Amazon Athena, Amazon Redshift, Amazon QuickSight, and more. For more information on how the integration works, see Using Amazon S3 Tables with AWS analytics services.
- S3 コンソールを通じて、テーブル バケットを AWS 分析サービスと自動的に統合できる
- この統合により、テーブルが AWS Glue データカタログに追加され、Amazon Athena、Amazon Redshift、Amazon QuickSight などの分析サービスを使用してテーブルを操作できるようになる
Using Amazon S3 Tables with AWS analytics services
下記を基に整理します。
To make tables in your account accessible by AWS analytics services, you integrate your table buckets with AWS Glue Data Catalog and AWS Lake Formation. You can use this integration to work with your S3 tables in these services:
- アカウント内のテーブルを AWS 分析サービスからアクセスできるようにするには、テーブルバケットを AWS Glue Data Catalog および AWS Lake Formation と統合する
- この統合を使用して、下記のサービスで S3 テーブルを操作できる
- Amazon Athena
- Amazon Redshift
- Amazon EMR
- Amazon QuickSight
- Amazon Data Firehose
How the integration works
コンソールでテーブルバケットを作成すると、Amazon S3 は次のアクションを開始し、選択したリージョン内のS3 tableバケットを AWS 分析サービスと統合する
- Lake Formation(LFn)に全てのテーブルバケットへのアクセスを許可する新しいIAMサービスロールを作成
- サービスロールを使用して、LFnは現在のリージョンにテーブルバケットを登録する
- これにより、LFnは、そのリージョンのすべてテーブルバケットへのアクセス、権限、ガバナンスを管理できる
- 現在のリージョンのGlueカタログに s3tablecatalogsを追加する。これにより、全てのテーブルバケット、名前空間、テーブルがデータカタログに取り込まれる
※出典:how-table-integration-works
料金
下記を基に整理します。
バージニアの料金を基にしています
ストレージ料金
- 監視、すべてのストレージ
- 1000個あたり、0.0025 ドル
- 最初の50TB/月
- 1GBあたり、0.0265 ドル
S3 テーブルリクエストの料金
- PUT、COPY、POST、LIST リクエスト (1,000 リクエストあたり)
- 0.005 ドル
- GET、SELECT、その他すべてのリクエスト(1,000 リクエストあたり)
- 0.0004 ドル
S3 テーブルのメンテナンス料金
- 圧縮 - オブジェクト
- 処理されるオブジェクト 1,000 個あたり 0.004 ドル
- 圧縮 - 処理されたデータ
- 処理される GB あたり 0.05 ドル
考察
分析に特化したS3ストレージであるS3 Tablesについて整理しました。
これまでGlueなどで管理していたIceberg形式のデータレイクテーブルを、S3上で直接管理できるようになった点は非常に便利だと感じます。今後、実際に試してみたいと思います。
参考