Using the console to create and manage multi-Region tables - Amazon Keyspaces (for Apache Cassandra)

Using the console to create and manage multi-Region tables

This section provides examples of how to create multi-Region keyspaces and tables in on-demand and provisioned capacity mode using the Amazon Keyspaces (for Apache Cassandra) console. All tables that you create in a multi-Region keyspace automatically inherit the multi-Region settings from the keyspace.

For CQL examples, see Using CQL to create and manage multi-Region tables. For AWS CLI examples, see Using the AWS CLI to create and manage multi-Region tables.

Creating a multi-Region keyspace (console)

Follow these steps to create a new multi-Region keyspace using the Amazon Keyspaces console.

To create a multi-Region keyspace (console)
  1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at https://console.aws.amazon.com/keyspaces/home.

  2. In the navigation pane, choose Keyspaces, and then choose Create keyspace.

  3. For Keyspace name, enter the name for the keyspace.

  4. In the Multi-Region replication section, you can add up to five additional Regions that are available in the list.

  5. To finish, choose Create keyspace.

    Note

    When creating a multi-Region keyspace, Amazon Keyspaces creates a service-linked role with the name AWSServiceRoleForAmazonKeyspacesReplication in your account. This role allows Amazon Keyspaces to replicate writes to all replicas of a multi-Region table on your behalf. To learn more, see Using roles for Amazon Keyspaces Multi-Region Replication.

Creating a multi-Region table with default settings (console)

Follow these steps to create a multi-Region table using the Amazon Keyspaces console.

To create a multi-Region table (console)
  1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at https://console.aws.amazon.com/keyspaces/home.

  2. Choose a multi-Region keyspace.

  3. On the Tables tab, choose Create table.

  4. For Table name, enter the name for the table. The AWS Regions that this table is being replicated in are shown in the info box.

  5. Continue with the table schema.

  6. Under Table settings, continue with the Default settings option. Note the following default settings for multi-Region tables.

    • Choose Customize settings if you need to turn on Time to Live (TTL) for the table and all its replicas.

      Note

      You won't be able to change TTL settings on an existing multi-Region table.

  7. To finish, choose Create table.

Creating a multi-Region table in provisioned mode with auto scaling enabled (console)

Note

Amazon Keyspaces automatic scaling requires the presence of a service-linked role (AWSServiceRoleForApplicationAutoScaling_CassandraTable) that performs automatic scaling actions on your behalf. This role is created automatically for you. For more information, see Using service-linked roles for Amazon Keyspaces.

To create a new multi-Region table with automatic scaling enabled
  1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at https://console.aws.amazon.com/keyspaces/home.

  2. Choose a multi-Region keyspace.

  3. On the Tables tab, choose Create table.

  4. On the Create table page in the Table details section, select a keyspace and provide a name for the new table.

  5. In the Columns section, create the schema for your table.

  6. In the Primary key section, define the primary key of the table and select optional clustering columns.

  7. In the Table settings section, choose Customize settings.

  8. Continue to Read/write capacity settings.

  9. For Capacity mode, choose Provisioned.

  10. In the Read capacity section, confirm that Scale automatically is selected.

    You can select to configure the same read capacity units for all AWS Regions that the table is replicated in. Alternatively, you can clear the check box and configure the read capacity for each Region differently.

    If you choose to configure each Region differently, you select the minimum and maximum read capacity units for each table replica, as well as the target utilization.

    • Minimum capacity units – Enter the value for the minimum level of throughput that the table should always be ready to support. The value must be between 1 and the maximum throughput per second quota for your account (40,000 by default).

    • Maximum capacity units – Enter the maximum amount of throughput that you want to provision for the table. The value must be between 1 and the maximum throughput per second quota for your account (40,000 by default).

    • Target utilization – Enter a target utilization rate between 20% and 90%. When traffic exceeds the defined target utilization rate, capacity is automatically scaled up. When traffic falls below the defined target, it is automatically scaled down again.

    • Clear the Scale automatically check box if you want to provision the table's read capacity manually. This setting applies to all replicas of the table.

      Note

      To ensure that there's enough read capacity for all replicas, we recommend Amazon Keyspaces automatic scaling for provisioned multi-Region tables.

    Note

    To learn more about default quotas for your account and how to increase them, see Quotas for Amazon Keyspaces (for Apache Cassandra).

  11. In the Write capacity section, confirm that Scale automatically is selected. Then configure the capacity units for the table. The write capacity units stay synced across all AWS Regions to ensure that there is enough capacity to replicate write events across the Regions.

    • Clear Scale automatically if you want to provision the table's write capacity manually. This setting applies to all replicas of the table.

      Note

      To ensure that there's enough write capacity for all replicas, we recommend Amazon Keyspaces automatic scaling for provisioned multi-Region tables.

  12. Choose Create table. Your table is created with the specified automatic scaling parameters.

Enabling auto scaling for an existing multi-Region table (console)

Follow these steps to enable auto scaling for a multi-Region table in provisioned mode with the Amazon Keyspaces console.

Note

Amazon Keyspaces automatic scaling requires the presence of a service-linked role (AWSServiceRoleForApplicationAutoScaling_CassandraTable) that performs automatic scaling actions on your behalf. This role is created automatically for you. For more information, see Using service-linked roles for Amazon Keyspaces.

To enable Amazon Keyspaces automatic scaling for an existing multi-Region table
  1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at https://console.aws.amazon.com/keyspaces/home.

  2. Choose the table that you want to work with, and go to the Capacity tab.

  3. In the Capacity settings section, choose Edit.

  4. Under Capacity mode, make sure that the table is using Provisioned capacity mode.

  5. Select Scale automatically, and see step 9 in Creating a multi-Region table in provisioned mode with auto scaling enabled (console) to edit read and write capacity.

  6. When the automatic scaling settings are defined, choose Save.

Turning off auto scaling for a multi-Region table (console)

Follow these steps to turn off auto scaling for a multi-Region table in provisioned mode with the Amazon Keyspaces console.

To turn off Amazon Keyspaces automatic scaling for an existing multi-Region table
  1. Sign in to the AWS Management Console, and open the Amazon Keyspaces console at https://console.aws.amazon.com/keyspaces/home.

  2. Choose the table that you want to work with and choose the Capacity tab.

  3. In the Capacity settings section, choose Edit.

  4. To disable Amazon Keyspaces automatic scaling, clear the Scale automatically check box. Disabling automatic scaling deregisters the table as a scalable target with Application Auto Scaling. To delete the service-linked role that Application Auto Scaling uses to access your Amazon Keyspaces table, follow the steps in Deleting a service-linked role for Amazon Keyspaces.

    Note

    To delete the service-linked role that Application Auto Scaling uses, you must disable automatic scaling on all tables in the account across all AWS Regions.

  5. When the automatic scaling settings are defined, choose Save.

Viewing Amazon Keyspaces auto scaling activities on the console

You can monitor how Amazon Keyspaces automatic scaling uses resources by using Amazon CloudWatch, which generates metrics about your usage and performance. Follow the steps in the Application Auto Scaling User Guide to create a CloudWatch dashboard.