

# System keyspaces in Amazon Keyspaces
<a name="working-with-keyspaces"></a>

System keyspaces and system tables in Amazon Keyspaces (for Apache Cassandra) are read-only resources that store metadata about your Amazon Keyspaces resources. System keyspaces are present in every AWS account, regardless of whether you have created any keyspaces or tables. They are a compatibility feature with Apache Cassandra, and they are provided at no additional charge.

You cannot modify or delete system keyspaces. The Amazon Keyspaces console displays only user-created keyspaces. System keyspaces are accessible programmatically through CQL and appear in services such as AWS CloudFormation and AWS Config.

Amazon Keyspaces uses four system keyspaces: 
+ `system`
+ `system_schema`
+ `system_schema_mcs`
+ `system_multiregion_info`

The following sections provide details about the system keyspaces and the system tables that are supported in Amazon Keyspaces.

## `system`
<a name="keyspace_system_list"></a>

This is a Cassandra keyspace. Amazon Keyspaces uses the following tables.


| Table names | Column names | Comments | 
| --- | --- | --- | 
|  `local`  |  `key, bootstrapped, broadcast_address, cluster_name, cql_version, data_center, gossip_generation, host_id, listen_address, native_protocol_version, partitioner, rack, release_version, rpc_address, schema_version, thrift_version, tokens, truncated_at`  |  Information about the local keyspace.  | 
|  `peers`  |  `peer, data_center, host_id, preferred_ip, rack, release_version, rpc_address, schema_version, tokens`  |  Query this table to see the available endpoints. For example, if you're connecting through a public endpoint, you see a list of nine available IP addresses. If you're connecting through a FIPS endpoint, you see a list of three IP addresses. If you're connecting through an AWS PrivateLink VPC endpoint, you see the list of IP addresses that you have configured. For more information, see [Populating `system.peers` table entries with interface VPC endpoint information](vpc-endpoints.md#system_peers).  | 
|  `size_estimates`  |  `keyspace_name, table_name, range_start, range_end, mean_partition_size, partitions_count`  | This table defines the total size and number of partitions for each token range for every table. This is needed for the Apache Cassandra Spark Connector, which uses the estimated partition size to distribute the work. | 
|  `prepared_statements`  |  `prepared_id, logged_keyspace, query_string`  |  This table contains information about saved queries.  | 

## `system_schema`
<a name="keyspace_system_schema"></a>

This is a Cassandra keyspace. Amazon Keyspaces uses the following tables.


| Table names | Column names | Comments | 
| --- | --- | --- | 
|  `keyspaces`  |  `keyspace_name, durable_writes, replication`  |  Information about a specific keyspace.  | 
|  `tables`  |  `keyspace_name, table_name, bloom_filter_fp_chance, caching, comment, compaction, compression, crc_check_chance, dclocal_read_repair_chance, default_time_to_live, extensions, flags, gc_grace_seconds, id, max_index_interval, memtable_flush_period_in_ms, min_index_interval, read_repair_chance, speculative_retry`  |  Information about a specific table.  | 
|  `types`  |  `keyspace_name, type_name, field_names, field_types`  |  Information about a specific user-defined type (UDT).  | 
|  `columns`  |  `keyspace_name, table_name, column_name, clustering_order, column_name_bytes, kind, position, type`  |  Information about a specific column.  | 

## `system_schema_mcs`
<a name="keyspace_system_schema_mcs"></a>

This is an Amazon Keyspaces keyspace that stores information about AWS or Amazon Keyspaces specific settings.


| Table names | Column names | Comments | 
| --- | --- | --- | 
|  `keyspaces`  |  `keyspace_name, durable_writes, replication`  |  Query this table to find out programmatically if a keyspace has been created. For more information, see [Check keyspace creation status in Amazon Keyspaces](keyspaces-create.md).  | 
|  `tables`  |  `keyspace_name, creation_time, speculative_retry, cdc, gc_grace_seconds, crc_check_chance, min_index_interval, bloom_filter_fp_chance, flags, custom_properties, dclocal_read_repair_chance, table_name, caching, default_time_to_live, read_repair_chance, max_index_interval, extensions, compaction, comment, id, compression, memtable_flush_period_in_ms, cdc_specification, latest_stream_arn status`  |  Query this table to find out the status of a specific table. For more information, see [Check table creation status in Amazon Keyspaces](tables-create.md). You can also query this table to list settings that are specific to Amazon Keyspaces and are stored as `custom_properties`. For example: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/keyspaces/latest/devguide/working-with-keyspaces.html)  | 
|  `tables_history`  |  `keyspace_name, table_name, event_time, creation_time, custom_properties, event`  |  Query this table to learn about schema changes for a specific table.  | 
|  `columns`  |  `keyspace_name, table_name, column_name, clustering_order, column_name_bytes, kind, position, type`  |  This table is identical to the Cassandra table in the `system_schema` keyspace.  | 
|  `tags`  |  `resource_id, keyspace_name, resource_name, resource_type, tags`  |  Query this table to find out if a keyspace has tags. For more information, see [View the tags of a table](Tagging.Operations.view.table.md).  | 
|  `types`  |  `keyspace_name, type_name, field_names, field_types, max_nesting_depth, last_modified_timestamp, status, direct_referring_tables, direct_parent_types`  |  Query this table to find out information about user-defined types (UDTs). For example you can query this table to list all UDTs for a given keyspace. For more information, see [User-defined types (UDTs) in Amazon Keyspaces](udts.md).  | 
|  `autoscaling`  |  `keyspace_name, table_name, provisioned_read_capacity_autoscaling_update, provisioned_write_capacity_autoscaling_update`  |  Query this table to get the auto scaling settings of a provisioned table. Note that these settings won't be available until the table is active. To query this table, you have to specify `keyspace_name` and `table_name` in the `WHERE` clause. For more information, see [View your table's Amazon Keyspaces auto scaling configuration](autoscaling.viewPolicy.md).  | 

## `system_multiregion_info`
<a name="keyspace_system_multiregion_info"></a>

This is an Amazon Keyspaces keyspace that stores information about multi-Region replication.


| Table names | Column names | Comments | 
| --- | --- | --- | 
|  `tables`  |  `keyspace_name, table_name, region, status`   |  This table contains information about multi-Region tables—for example, the AWS Regions that the table is replicated in and the table's status. You can also query this table to list settings that are specific to Amazon Keyspaces that are stored as `custom_properties`. For example: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/keyspaces/latest/devguide/working-with-keyspaces.html) To query this table, you have to specify `keyspace_name` and `table_name` in the `WHERE` clause. For more information, see [Create a multi-Region keyspace in Amazon Keyspaces](keyspaces-mrr-create.md).  | 
|  `keyspaces`  |  `keyspace_name, region, status, tables_replication_progress`   |  This table contains information about the progress of an `ALTER KEYSPACE` operation that adds a replica to a keyspace — for example, how many tables have already been created in the new Region, and how many tables are still in progress. For an examples, see [Check the replication progress when adding a new Region to a keyspace](keyspaces-multi-region-replica-status.md).  | 
|  `autoscaling`  |  `keyspace_name, table_name, provisioned_read_capacity_autoscaling_update, provisioned_write_capacity_autoscaling_update, region`  |  Query this table to get the auto scaling settings of a multi-Region provisioned table. Note that these settings won't be available until the table is active. To query this table, you have to specify `keyspace_name` and `table_name` in the `WHERE` clause. For more information, see [Update the provisioned capacity and auto scaling settings for a multi-Region table in Amazon Keyspaces](tables-mrr-autoscaling.md).  | 
|  `types`  |  `keyspace_name, type_name, field_names, field_types, max_nesting_depth, last_modified_timestamp, status, direct_referring_tables, direct_parent_types, region`  |  Query this table to find out information about user-defined types (UDTs) in multi-Region keyspaces. For example, you can query this table to list all table replicas and their respective AWS Regions that use UDTs for a given keyspace. For more information, see [User-defined types (UDTs) in Amazon Keyspaces](udts.md).  | 