

# Turning on usage system tables for a domain

Turn on system table integration so that Amazon SageMaker Unified Studio publishes a daily snapshot of a domain to Amazon S3 Tables in your account. You configure the integration for each domain, and each domain has at most one configuration.

Amazon SageMaker Unified Studio turns on the integration automatically for new domains that you create on the AWS Management Console. For domains that you create with the AWS Command Line Interface (AWS CLI), and for domains that existed before this feature was available, a domain administrator turns it on. You can turn it on from **Settings**, or while you set up the Domain and project usage dashboard on the **Monitoring** page. Both methods turn on the same integration.

## Prerequisites
<a name="usage-system-tables-enable-prereqs"></a>

Before you turn on the integration, confirm the following:
+ You are an administrator of the domain, and you are working in the domain's AWS account. You can turn on the integration only from the domain's account.
+ The principal that turns on the integration has the permissions in [Example policy: Allow a principal to turn on usage system tables](usage-system-tables-example-policy.md). When you turn on the integration from the Amazon SageMaker Unified Studio portal, the call is made with the domain's credentials. For a domain that uses AWS IAM Identity Center, that is the domain execution role.
+ If the domain is encrypted with a customer managed AWS Key Management Service (AWS KMS) key, the key policy allows the system tables service to use the key. For the statements to add, see [Security and data governance for usage system tables](usage-system-tables-security.md).

## To turn on usage system tables from Settings
<a name="usage-system-tables-enable-settings"></a>

1. Sign in to Amazon SageMaker Unified Studio as a domain administrator.

1. Open the **Domain Management** portal.

1. In the left navigation, choose **Settings**.

1. Scroll down to **System table integration**.

1. Choose **Enable**.

1. In the **Enable system table integration?** dialog box, choose **Enable**.

## To turn on usage system tables while setting up the dashboard
<a name="usage-system-tables-enable-dashboard"></a>

1. Sign in to Amazon SageMaker Unified Studio as a domain administrator.

1. Open the **Domain Management** portal.

1. In the left navigation, choose **Monitoring**.

1. On the **Domain and project usage** card, choose **Set up**.

1. If you see **Enable system table integration to set up this dashboard**, choose **Enable**.

## Expected results
<a name="usage-system-tables-enable-on-results"></a>

When the integration is on, the **System table integration** card shows **Enabled**. Amazon SageMaker Unified Studio creates the table bucket, the namespace, and the tables, and schedules the daily export. The namespace and tables appear right away, and they stay empty until the first daily snapshot is written, within about 24 hours. If you turned on the integration from the **Monitoring** page, Amazon SageMaker Unified Studio also creates the dashboard and schedules its daily updates.

## To turn off usage system tables
<a name="usage-system-tables-enable-off"></a>

1. In the **Domain Management** portal, choose **Settings**.

1. On the **System table integration** card, choose **Disable**.

1. In the **Disable system table integration?** dialog box, confirm.

## Expected results
<a name="usage-system-tables-enable-off-results"></a>

Amazon SageMaker Unified Studio stops publishing new data to the usage system tables. The tables and the data already in them stay in your account. The Domain and project usage dashboard isn't updated with new data, and it shows the data from before you turned off the integration. To resume, turn on the integration again. Turning it on again doesn't backfill the gap.

## Troubleshooting
<a name="usage-system-tables-enable-troubleshooting"></a>
+ **Turning on the integration fails with `KMS_KEY_ACCESS_DENIED`**

  The domain's customer managed key doesn't allow the system tables service to use it. Add the key policy statements in [Security and data governance for usage system tables](usage-system-tables-security.md), and then try again.
+ **The tables are empty**

  The first snapshot is written on the first scheduled run after the domain is at least 24 hours old. Check again after 24 hours.