Upgrading a Cluster’s Engine Version

If you are running an earlier engine version, you can upgrade your cluster’s engine version using the AWS Management Console or the AWS CLI. You can upgrade it immediately or during your cluster’s next maintenance window. When you upgrade the engine version, your cluster will experience some downtime. To determine whether your engine needs an upgrade, see Determining Pending Maintenance.

To upgrade a cluster’s engine version:

  • The cluster’s status must be available.

  • The cluster must be running an earlier engine version.

Using the AWS Management Console

The following procedure upgrades your cluster’s engine version to the latest version using the console. You have the option to upgrade immediately or during your cluster’s next maintenance window.

  1. Sign in to the AWS Management Console, and open the Amazon DocumentDB console at https://console.aws.amazon.com/docdb.

  2. In the navigation pane, choose Clusters. In the list of clusters, choose the button to the left of the cluster that you want to upgrade. The status of the cluster must be available.

    Tip

    If you don’t see the navigation pane on the left side of your screen, choose the menu icon (Upgrading a Cluster’s Engine Version - 图1) in the upper-left corner of the page.

  3. From the Actions menu, choose one of the following options. These menu options are selectable only if the cluster you chose is not running the latest engine version.

    ![

    1. Image: Amazon DocumentDB Upgrade actions
    2. ](/projects/DocumentDB-20201111-en/9e939105c41b15d729ba99583156e54e.png)
    • Upgrade now—Immediately initiates the upgrade process. Your cluster will be offline for a time while the cluster is upgraded to the latest engine version.

    • Upgrade at next window—Initiates the upgrade process during the cluster’s next maintenance window. Your cluster will be offline for a time while it is upgraded to the latest engine version.

  4. When the confirmation window opens, choose one of the following:

    • Upgrade—To upgrade your cluster to the latest engine version according to the schedule chosen in the previous step.

    • Cancel—To cancel the cluster’s engine upgrade and continue with the cluster’s current engine version.

Using the AWS CLI

You can upgrade your cluster to a newer engine version using the AWS CLI and the apply-pending-maintenance-action operation with the following parameters.

Parameters

  • --resource-identifier—Required. The ARN of the Amazon DocumentDB cluster that you are going to upgrade.

  • --apply-action—Required. The following values are permitted. To upgrade your cluster engine version, use db-upgrade.

    • db-upgrade

    • system-update

  • --opt-in-type—Required. The following values are permitted.

    • immediate—Apply the maintenance action immediately.

    • next-maintenance—Apply the maintenance action during the next maintenance window.

    • undo-opt-in—Cancel any existing next-maintenance opt-in requests.

The following example upgrades the engine version of sample-cluster to version 4.0.0.

For Linux, macOS, or Unix:

  1. aws docdb apply-pending-maintenance-action \
  2. --resource-identifier arn:aws:rds:us-east-1:123456789012\:cluster:sample-cluster \
  3. --apply-action db-upgrade \
  4. --opt-in-type immediate

For Windows:

  1. aws docdb apply-pending-maintenance-action ^
  2. --resource-identifier arn:aws:rds:us-east-1:123456789012:cluster:sample-cluster ^
  3. --apply-action db-upgrade ^
  4. --opt-in-type immediate

Output from this operation looks like the following.

  1. {
  2. "ResourcePendingMaintenanceActions": {
  3. "ResourceIdentifier": "arn:aws:rds:us-east-1:444455556666:cluster:docdb-2019-01-09-23-55-38",
  4. "PendingMaintenanceActionDetails": [
  5. {
  6. "CurrentApplyDate": "2019-02-20T20:57:06.904Z",
  7. "Description": "Bug fixes",
  8. "ForcedApplyDate": "2019-02-25T21:46:00Z",
  9. "OptInStatus": "immediate",
  10. "Action": "db-upgrade",
  11. "AutoAppliedAfterDate": "2019-02-25T07:41:00Z"
  12. }
  13. ]
  14. }
  15. }