View a markdown version of this page

Use Amazon S3 system tables - Amazon Simple Storage Service

Use Amazon S3 system tables

AWS services offer system tables: read-only Apache Iceberg tables in your account that hold data about your resources and activity, which you can query with SQL. For an overview, see Working with system tables.

Amazon S3 system tables include an inventory of your general purpose buckets, table buckets, and vector buckets. They also include metadata for the objects in your buckets, your storage metrics, and the requests made to your buckets.

With these tables, you can do the following:

  • List your general purpose buckets, table buckets, and vector buckets.

  • Find objects by storage class, encryption type, or tags.

  • Track storage usage and activity over time.

  • See who is accessing your buckets and which requests fail.

How Amazon S3 system tables work

Amazon S3 system tables are stored in three AWS managed table buckets in your account and Region.

Table bucket Contains
aws-catalog Inventories of your general purpose buckets, table buckets, and vector buckets
aws-s3 Object metadata and storage metrics
aws-cloudwatch Server access logs

For how AWS creates and maintains system tables, see How system tables work.

Storage location

Each group of tables has its own namespace. Amazon S3 Metadata uses one namespace for each source bucket, and Amazon S3 Storage Lens uses one namespace for each Storage Lens configuration.

aws-catalog/ +-- s3/ # General purpose buckets | +-- buckets/ +-- s3tables/ # S3 Tables | +-- buckets/ | +-- namespaces/ | +-- tables/ | +-- table_columns/ +-- s3vectors/ # S3 Vectors +-- buckets/ +-- indexes/ aws-s3/ +-- b_<bucket-name>/ # S3 Metadata, one per source bucket | +-- journal/ | +-- inventory/ | +-- annotation/ +-- lens_<config-id>_exp[_<hash>]/ # S3 Storage Lens, one per configuration +-- default_storage_metrics/ +-- default_activity_metrics/ +-- expanded_prefixes_storage_metrics/ +-- expanded_prefixes_activity_metrics/ +-- bucket_property_metrics/ aws-cloudwatch/ +-- logs/ +-- amazon_s3__server_access/

The following query returns 10 rows from the general purpose buckets table.

SELECT * FROM "s3tablescatalog/aws-catalog"."s3"."buckets" LIMIT 10;

Supported system tables

Amazon S3 has the following system tables, from an inventory of your buckets to the requests made to them:

What you can query Tables Table bucket and namespace More information
General purpose buckets: an inventory of your general purpose buckets buckets aws-catalog / s3 Amazon S3 system tables schema and example queries
Amazon S3 Tables: an inventory of your table buckets, namespaces, tables, and columns buckets, namespaces, tables, table_columns aws-catalog / s3tables Amazon S3 system tables schema and example queries
Amazon S3 Vectors: an inventory of your vector buckets and vector indexes buckets, indexes aws-catalog / s3vectors Amazon S3 system tables schema and example queries
Amazon S3 Metadata: change events, current state, and annotations for the objects in a general purpose bucket journal, inventory, annotation aws-s3 / b_<bucket-name> Discovering your data with S3 Metadata tables
Amazon S3 Storage Lens: storage, activity, prefix, and bucket property metrics default_storage_metrics, default_activity_metrics, expanded_prefixes_storage_metrics, expanded_prefixes_activity_metrics, bucket_property_metrics aws-s3 / lens_<config-id>_exp[_<hash>] Viewing metrics in AWS managed S3 Tables
Server access logs: the requests made to your buckets amazon_s3__server_access aws-cloudwatch / logs Querying access logs in S3 Tables

Enabling system tables

You turn on each group of tables separately:

For the permissions to query the tables, see Permissions for querying system tables.

Schema and example queries

For the columns and example queries of the general purpose bucket, S3 Tables, and S3 Vectors tables, see Amazon S3 system tables schema and example queries. For the S3 Metadata, S3 Storage Lens, and server access log tables, see the page for each feature listed in Supported system tables.

Querying Amazon S3 system tables with AI agents

AI agents that are compatible with the Model Context Protocol (MCP) can query Amazon S3 system tables. The Agent Toolkit for AWS includes the following system table skills for Amazon S3:

To use a skill, download it from GitHub and add it to your agent's skills directory.