Working with system tables
AWS services create and maintain system tables as Apache Iceberg tables in AWS managed table buckets in your account. They include operational data, such as logs, metrics, and query and job history, and resource data, such as the inventory and configuration of your resources. You can query system tables with SQL from AWS analytics services and any engine that is compatible with Apache Iceberg. Use them to analyze queries, troubleshoot failed jobs, track storage usage, and review configuration across AWS services. For more information about AWS managed table buckets, see Working with AWS managed table buckets.
How system tables work
The following points apply to every system table:
-
After you turn on system tables, AWS creates the table bucket, namespaces, and tables for you. Some tables appear only after the service has data to write to them.
-
AWS defines the schemas and writes the data. Amazon S3 Tables handles compaction and snapshots.
-
The tables are read-only. You can't insert, update, or delete rows.
-
You control who can read the tables.
AWS services that offer system tables
The following AWS services offer system tables. Each link goes to the documentation for that service or feature, including how to turn its system tables on:
-
AWS Glue Data Catalog (catalog metadata, lineage, and data quality)
-
AWS Glue ETL (jobs and interactive sessions)
The following database services also offer resource system tables:
-
Amazon Aurora
-
Amazon DocumentDB (with MongoDB compatibility)
-
Amazon DynamoDB
-
Amazon ElastiCache
-
Amazon Keyspaces (for Apache Cassandra)
-
Amazon Neptune
-
Amazon Relational Database Service (Amazon RDS)
-
Amazon Timestream for InfluxDB
AWS Glue Data Catalog writes these tables to the aws-catalog table bucket. To turn them on, see Turning on resource system tables.
Turning on resource system tables
AWS Glue Data Catalog writes resource system tables, such as inventories of your database clusters, streams, and Athena workgroups, to the aws-catalog table bucket. To get these tables, turn on auto-discovery and metadata export in AWS Glue Data Catalog. There's no separate setting for each service or table. For instructions, see Use AWS Glue Data Catalog system tables in the AWS Glue User Guide.
Permissions for querying system tables
To query system tables with AWS analytics services, such as Amazon Athena, first integrate your table buckets with AWS analytics services. For instructions, see Integrating Amazon S3 Tables with AWS analytics services. For the permissions that you need, see Permissions to work with AWS managed table buckets and to query tables. For example queries, see Querying tables in AWS managed table buckets.
Queries across services
You can join system tables from more than one service. For example, you can join tables to answer the following questions:
-
Which Data Catalog tables were not named in any Athena query in the last 90 days? Join
glue.tableswith thetables_accessedcolumn of the Athenaquery_executionstable, and use UNNEST to flattentables_accessed. -
How many queries ran in each workgroup, and how much data did they scan? Join
athena.work_groupswith the Athenaquery_executionstable on the workgroup name. -
Which buckets store data in S3 Standard but had no read requests in the last 90 days? Combine the S3 Storage Lens storage metrics with the server access logs table (
amazon_s3__server_access).