Using the Amazon Web Services Management Console with DynamoDB auto scaling - Amazon DynamoDB
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Using the Amazon Web Services Management Console with DynamoDB auto scaling

When you use the Amazon Web Services Management Console to create a new table, Amazon DynamoDB auto scaling is enabled for that table by default. You can also use the console to enable auto scaling for existing tables, modify auto scaling settings, or disable auto scaling.

Note

For more advanced features like setting scale-in and scale-out cooldown times, use the Amazon Command Line Interface (Amazon CLI) to manage DynamoDB auto scaling. For more information, see Using the Amazon CLI to manage DynamoDB auto scaling.

Before you begin: Granting user permissions for DynamoDB auto scaling

In Amazon Identity and Access Management (IAM), the AWS managed policy DynamoDBFullAccess provides the required permissions for using the DynamoDB console. However, for DynamoDB auto scaling, IAM users require additional privileges.

Important

application-autoscaling:* permissions are required to delete an auto scaling-enabled table. The AWS managed policy DynamoDBFullAccess includes such permissions.

To set up an IAM user for DynamoDB console access and DynamoDB auto scaling, add the following policy.

To attach the AmazonDynamoDBFullAccess policy

  1. Sign in to the Amazon Web Services Management Console and open the IAM console at https://console.amazonaws.cn/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 AmazonDynamoDBFullAccess, and then choose Next: Review.

  6. Choose Add permissions.

Creating a new table with auto scaling enabled

Note

DynamoDB auto scaling requires the presence of a service linked role (AWSServiceRoleForApplicationAutoScaling_DynamoDBTable) that performs auto scaling actions on your behalf. This role is created automatically for you. For more information, see Service-linked roles for Application Auto Scaling in the Application Auto Scaling User Guide.

To create a new table with auto scaling enabled

  1. Open the DynamoDB console at https://console.amazonaws.cn/dynamodb/.

  2. Choose Create Table.

  3. On the Create table page, enter a Table name and primary key.

  4. If Default settings is selected, the table will be created with auto scaling enabled.

    Otherwise, for custom settings:

    1. Select Customize settings.

    2. In the Read/write capacity settings section, select Provisioned capacity mode and set Auto scaling to On for Read capacity, Write capacity, or both. For each of these, set your desired scaling policy for the table and, optionally, all global secondary indexes of the table.

      • Minimum capacity units—Enter your lower boundary for the auto scaling range.

      • Maximum capacity units—Enter your upper boundary for the auto scaling range.

      • Target utilization—Enter your target utilization percentage for the table.

      Note

      If you create a global secondary index for the new table, the index's capacity at time of creation will be the same as your base table's capacity. You can change the index's capacity in the table's settings after you create the table.

  5. When the settings are as you want them, choose Create table. Your table is created with the auto scaling parameters.

Enabling DynamoDB auto scaling on existing tables

Note

DynamoDB auto scaling requires the presence of a service linked role (AWSServiceRoleForApplicationAutoScaling_DynamoDBTable) that performs auto scaling actions on your behalf. This role is created automatically for you. For more information, see Service-linked roles for Application Auto Scaling.

To enable DynamoDB auto scaling for an existing table

  1. Open the DynamoDB console at https://console.amazonaws.cn/dynamodb/.

  2. In the navigation pane on the left side of the console, choose Tables.

  3. Choose the table that you want to work with and select the Additional settings tab.

  4. In the Read/write capacity section, select Edit.

  5. In the Capacity mode section, select Provisioned.

  6. In the Table capacity section, set Auto scaling to On for Read capacity, Write capacity, or both. For each of these, set your desired scaling policy for the table and, optionally, all global secondary indexes of the table.

    • Minimum capacity units—Enter your lower boundary for the auto scaling range.

    • Maximum capacity units—Enter your upper boundary for the auto scaling range.

    • Target utilization—Enter your target utilization percentage for the table.

    • Use the same capacity read/write capacity settings for all global secondary indexes—Choose whether global secondary indexes should use the same auto scaling policy as the base table.

      Note

      For best performance, we recommend that you enable Use the same read/write capacity settings for all global secondary indexes. This option allows DynamoDB auto scaling to uniformly scale all the global secondary indexes on the base table. This includes existing global secondary indexes, and any others that you create for this table in the future.

      With this option enabled, you can't set a scaling policy on an individual global secondary index.

  7. When the settings are as you want them, choose Save.

Viewing auto scaling activities on the console

As your application drives read and write traffic to your table, DynamoDB auto scaling dynamically modifies the table's throughput settings. Amazon CloudWatch keeps track of provisioned and consumed capacity, throttled events, latency, and other metrics for all of your DynamoDB tables and secondary indexes.

To view these metrics in the DynamoDB console, choose the table that you want to work with and select the Monitor tab. To create a customizable view of table metrics, select View all in CloudWatch.

For more information about CloudWatch monitoring in DynamoDB, see Monitoring with Amazon CloudWatch.

Modifying or disabling DynamoDB auto scaling settings

You can use the Amazon Web Services Management Console to modify your DynamoDB auto scaling settings. To do this, go to the Additional settings tab for your table, and select Edit in the Read/write capacity section. For more information about these settings, see Enabling DynamoDB auto scaling on existing tables.