Managing Amazon DocumentDB serverless
Viewing and modifying a cluster’s scaling capacity range configuration
The ServerlessV2ScalingConfiguration argument specifies the scaling capacity range of your DocumentDB serverless instances.
It consists of the minimum and maximum DocumentDB capacity unit (DCU) values that apply to all the DocumentDB serverless instances in the cluster.
MinCapacity— The minimum scaling capacity of any DocumentDB serverless instances in the cluster.MaxCapacity— The maximum scaling capacity of any DocumentDB serverless instances in the cluster.
Note
The following scaling configuration modifications require an instance restart to reflect the new MinCapacity and MaxCapacity values:
Any changes to the
MaxCapacityvalueChanging the
MinCapacityvalue to 1.0 or lower from a higher valueChanging the
MinCapacityvalue to greater than 1.0 from a lower value
For more information on scaling configuration and how to select appropriate scaling capacity limits, see Amazon DocumentDB serverless scaling configuration.
Viewing and modifying the promotion tier of serverless readers
For clusters containing multiple DocumentDB serverless instances or a mixture of provisioned and serverless instances, pay attention to the promotion tier setting for each serverless instance. This setting controls more behavior for serverless instances than for provisioned instances.
For provisioned instances, the choice of tier 0–15 determines only the order in which Amazon DocumentDB chooses which reader instance to promote to the writer during a failover operation. However, for serverless instances, the tier number also determines whether the instance scales up to match the capacity of the writer instance or scales independently based on its own workload. Serverless reader instances in tier 0 or 1 are kept at a minimum capacity at least as high as the writer instance. That way, they are ready to take over from the writer instance in case of a failover. If the writer instance is a provisioned instance, Amazon DocumentDB estimates the equivalent DocumentDB serverless capacity. It uses that estimate as the minimum capacity for the serverless reader instance.
DocumentDB serverless reader instances in tiers 2–15 don't have the same constraint on their minimum capacity. When they are idle, they can scale down to the minimum DocumentDB capacity unit (DCU) value specified in the cluster's capacity range.
Checking and upgrading the platform version of a serverless cluster
Important
After you upgrade to a newer platform version, you can't downgrade to a previous version.
Checking the platform version for an existing cluster
Checking the default platform version
You can use the describe-serverless-v2-platform-versions AWS CLI command to check the details of a platform version, or to check the default platform version that you get when you create a new cluster.
aws docdb describe-serverless-v2-platform-versions \ --engine docdb \ --default-only
The following is the output of this command:
{
"ServerlessV2PlatformVersions": [
{
"ServerlessV2PlatformVersion": "4",
"ServerlessV2PlatformVersionDescription": "Version 4 offering scaling up to 256 DCUs, and performance improvement up to 35% compared to version 3",
"Engine": "docdb",
"ServerlessV2FeaturesSupport": {
"MinCapacity": 0.5,
"MaxCapacity": 256.0
},
"Status": "enabled",
"IsDefault": true
}
]
}
Checking for pending platform version upgrades
You can use the describe-pending-maintenance-actions AWS CLI command to check whether there are any pending platform version upgrades for your DocumentDB serverless clusters.
A pending platform version upgrade appears as the serverless-platform-version-update maintenance action.
To check for pending upgrades on a specific cluster, use the --resource-identifier parameter to specify the Amazon Resource Name (ARN) of your cluster:
aws docdb describe-pending-maintenance-actions \ --resource-identifier arn:aws:rds:us-east-1:111122223333:cluster:sample-cluster
Output from this operation looks something like the following (JSON format).
{
"PendingMaintenanceActions": [
{
"ResourceIdentifier": "arn:aws:rds:us-east-1:111122223333:cluster:sample-cluster",
"PendingMaintenanceActionDetails": [
{
"Action": "serverless-platform-version-update",
"Description": "Upgrade to platform version 4"
}
]
}
]
}
Scheduling a platform version upgrade
To schedule when a pending platform version upgrade occurs, use the apply-pending-maintenance-action AWS CLI command after you identify the pending upgrade.
To schedule a platform version upgrade, specify the following parameters:
--resource-identifier— The ARN of your DocumentDB serverless cluster.--apply-action— Useserverless-platform-version-updateto specify a platform version upgrade.--opt-in-type— Choose when to apply the upgrade. Use one of the following values:immediate— Apply the upgrade immediately.next-maintenance— Apply the upgrade during your next scheduled maintenance window.
Example
For Linux, macOS, or Unix:
aws docdb apply-pending-maintenance-action \ --resource-identifier arn:aws:rds:us-east-1:111122223333:cluster:sample-cluster\ --apply-action serverless-platform-version-update \ --opt-in-type immediate
For Windows:
aws docdb apply-pending-maintenance-action ^ --resource-identifier arn:aws:rds:us-east-1:111122223333:cluster:sample-cluster^ --apply-action serverless-platform-version-update ^ --opt-in-type immediate
For more information about maintenance actions, see Maintaining Amazon DocumentDB.