Managing Amazon Keyspaces automatic scaling policies with the console - Amazon Keyspaces (for Apache Cassandra)

Managing Amazon Keyspaces automatic scaling policies with the console

You can use the console to enable Amazon Keyspaces automatic scaling for new and existing tables. You can also use the console to modify automatic scaling settings or disable automatic scaling.

Note

For more advanced features like setting scale-in and scale-out cooldown times, use CQL or the AWS Command Line Interface (AWS CLI) to manage Amazon Keyspaces scaling policies programmatically. For more information, see Managing Amazon Keyspaces auto scaling with Cassandra Query Language (CQL) or Managing Amazon Keyspaces scaling policies with the CLI.

Before you begin: Granting user permissions for Amazon Keyspaces automatic scaling

To get started, confirm that the user has the appropriate permissions to create and manage automatic scaling settings. In AWS Identity and Access Management (IAM), the AWS managed policy AmazonKeyspacesFullAccess is required to manage Amazon Keyspaces scaling policies.

Important

application-autoscaling:* permissions are required to disable automatic scaling on a table. You must turn off auto scaling for a table before you can delete it.

To set up an IAM user for Amazon Keyspaces console access and Amazon Keyspaces automatic scaling, add the following policy.

To attach the AmazonKeyspacesFullAccess policy
  1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/.

  2. On the IAM console dashboard, choose Users, and then choose your IAM user from the list.

  3. On the Summary page, choose Add permissions.

  4. Choose Attach existing policies directly.

  5. From the list of policies, choose AmazonKeyspacesFullAccess, and then choose Next: Review.

  6. Choose Add permissions.

Creating a new table with Amazon Keyspaces automatic scaling enabled

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 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. In the navigation pane, choose Tables, and then choose Create table.

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

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

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

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

  7. Continue to Read/write capacity settings.

  8. For Capacity mode, choose Provisioned.

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

    In this step, you select the minimum and maximum read capacity units for the table, 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 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.

    Note

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

  10. In the Write capacity section, choose the same settings as defined in the previous step for read capacity, or configure capacity values manually.

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

Enabling Amazon Keyspaces automatic scaling on existing tables

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 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 6 in Creating a new table with Amazon Keyspaces automatic scaling enabled to edit read and write capacity.

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

Modifying or disabling Amazon Keyspaces automatic scaling settings

You can use the AWS Management Console to modify your Amazon Keyspaces automatic scaling settings. To do this, choose the table you want to edit and go to the Capacity tab. In the Capacity settings section, choose Edit. You can now modify the settings in the Read capacity or Write capacity sections. For more information about these settings, see Creating a new table with Amazon Keyspaces automatic scaling enabled.

To disable Amazon Keyspaces automatic scaling, deselect Scale automatically. Disabling automatic scaling deregisters the table as a scalable target with Application Auto Scaling. To delete the service-linked role used by Application Auto Scaling 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 used by Application Auto Scaling, you must disable automatic scaling on all tables in the account across all AWS Regions.

Viewing Amazon Keyspaces automatic 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.