Use Amazon OpenSearch Service 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 in the Amazon S3 User Guide.
With system tables for Amazon OpenSearch Service, an inventory of your domains, OpenSearch Serverless collections, and indexes is stored in tables that you can query to review configuration across your search resources. The tables are stored as fully managed Amazon S3 Tables, in Apache Iceberg format. You can query them with Amazon Athena, Amazon Redshift, or any other engine that is compatible with Apache Iceberg.
With these tables, you can do the following:
Review domains by encryption at rest and audit logging.
Review collections by type, deletion protection, and standby replicas.
How Amazon OpenSearch Service system tables work
AWS Glue Data Catalog writes Amazon OpenSearch Service system tables to the aws-catalog table bucket in your account and Region. After you turn on auto-discovery and metadata export in AWS Glue Data Catalog, it writes an inventory of your Amazon OpenSearch Service resources and keeps it up to date as your resources change.
AWS manages the tables for you, including the schemas, partitioning, compaction, and snapshots. The tables are read-only. You control who can read them.
For how system tables work across AWS services, see Working with system tables in the Amazon S3 User Guide.
Storage location
The tables are stored in the aws-catalog table bucket, in the opensearch namespace. Other AWS services store their resource system tables in the same bucket, each in its own namespace.
aws-catalog/ # S3 Tables bucket (one per account and Region) +-- opensearch/ # Namespace +-- domains/ # Table +-- collections/ # Table +-- indexes/ # Table
The following query returns 10 rows from the domains table:
SELECT * FROM "s3tablescatalog/aws-catalog"."opensearch"."domains" LIMIT 10;
Supported system tables
Amazon OpenSearch Service has the following system tables:
domains: one row for each domain in your account and Region.collections: one row for each Serverless collection in your account and Region.indexes: one row for each index in your account and Region.
Enabling system tables
To turn on and query the tables, see Turning on resource system tables and Permissions for querying system tables in Working with system tables in the Amazon S3 User Guide.
Schema and example queries
For the columns and example queries of each table, see Amazon OpenSearch Service system tables schema and example queries.