Scaling Aurora Serverless DB cluster capacity manually - Amazon Aurora

Scaling Aurora Serverless DB cluster capacity manually

Typically, Aurora Serverless DB clusters scale seamlessly based on the workload. However, capacity might not always scale fast enough to meet sudden extremes, such as an exponential increase in transactions. In such cases you can initiate the scaling operation manually by setting a new capacity value. After you set the capacity explicitly, Aurora Serverless automatically scales the DB cluster. It does so based on the cooldown period for scaling down.

You can explicitly set the capacity of an Aurora Serverless DB cluster to a specific value with the AWS Management Console, the AWS CLI, or the RDS API.

You can set the capacity of an Aurora DB cluster with the AWS Management Console.

To modify an Aurora Serverless DB cluster

  1. Open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Databases.

  3. Choose the Aurora Serverless DB cluster that you want to modify.

  4. For Actions, choose Set capacity.

  5. In the Scale database capacity window, choose the following:

    1. For the Scale DB cluster to drop-down selector, choose the new capacity that you want for your DB cluster.

    2. For the If a seamless scaling point cannot be found... checkbox, choose the behavior you want for your Aurora Serverless DB cluster's TimeoutAction setting, as follows:

      • Uncheck this option if you want your capacity to remain unchanged if Aurora Serverless can't find a scaling point before timing out.

      • Check this option if you want to force your Aurora Serverless DB cluster change its capacity even if it can't find a scaling point before timing out. This option can result Aurora Serverless dropping connections that prevent it from finding a scaling point.

    3. In the seconds field, enter the amount of time you want to allow your Aurora Serverless DB cluster to look for a scaling point before timing out. You can specify anywhere from 10 seconds to 600 seconds (10 minutes). The default is five minutes (300 seconds). This following example forces the Aurora Serverless DB cluster to scale to the 2 ACUs even if it can't find a scaling point within five minutes.

      
                      Setting capacity for an Aurora Serverless DB cluster with console
  6. Choose Apply.

To learn more about scaling points, TimeoutAction, and cooldown periods, see Autoscaling for Aurora Serverless.

To set the capacity of an Aurora Serverless DB cluster using the AWS CLI, run the modify-current-db-cluster-capacity AWS CLI command, and specify the --capacity option. Valid capacity values include the following:

  • Aurora MySQL: 1, 2, 4, 8, 16, 32, 64, 128, and 256.

  • Aurora PostgreSQL: 2, 4, 8, 16, 32, 64, 192, and 384.

In this example, you set the capacity of an Aurora Serverless DB cluster named sample-cluster to 64.

aws rds modify-current-db-cluster-capacity --db-cluster-identifier sample-cluster --capacity 64

You can set the capacity of an Aurora DB cluster with the ModifyCurrentDBClusterCapacity API operation. Specify the Capacity parameter. Valid capacity values include the following:

  • Aurora MySQL: 1, 2, 4, 8, 16, 32, 64, 128, and 256.

  • Aurora PostgreSQL: 2, 4, 8, 16, 32, 64, 192, and 384.