Modifying Amazon DocumentDB Cluster Parameter Groups

This section explains how to modify a custom Amazon DocumentDB parameter group. In Amazon DocumentDB, you cannot make modifications directly to the default.docdb4.0 cluster parameter group. If your Amazon DocumentDB cluster is using the default cluster parameter group and you want to modify a value in it, you must first create a new parameter group or copy an existing parameter group, modify it, and then apply the modified parameter group to your cluster.

Complete the following steps to modify a non-default cluster parameter group. After you modify a cluster parameter group, you should wait at least 5 minutes before using it. This allows Amazon DocumentDB to fully complete the modify action before the cluster parameter group is used. You can use the AWS Management Console or the AWS CLI describe-db-cluster-parameters operation to verify that your cluster parameter group has been modified. For more information, see Describing Cluster Parameter Groups.

Follow these steps to modify a custom Amazon DocumentDB parameter group. You can’t modify a default parameter group. If you want to modify a value in the default parameter group, you can copy the default cluster parameter group, modify it, and then apply the modified parameter group to your cluster. For more information about applying parameter groups to your cluster, see Modifying an Amazon DocumentDB Cluster.

To modify a custom cluster parameter group

  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 on the left side of the console, choose Parameter groups. In the list of parameter groups, choose the name of the parameter group that you want to modify.

    Tip

    If you don’t see the navigation pane on the left side of your screen, choose the menu icon (Modifying Cluster Parameter Groups - 图1) in the upper-left corner of the page.

  3. For each parameter in the parameter group that you want to modify, do the following:

    1. Locate the parameter that you want to modify, and verify that it is modifiable by checking if it is listed as true under the Modifiable column.

    2. If it is modifiable, select the parameter and choose Edit from the top right of the console page.

    3. In the Modify <parameter-name> dialog box, make the changes that you want. Then choose Modify cluster parameter, or choose Cancel to discard the changes.

You can modify the ParameterValue, Description, or ApplyMethod of any modifiable parameter in a custom Amazon DocumentDB cluster parameter group using the AWS CLI. You can’t make modifications directly to a default cluster parameter group.

To modify a custom cluster parameter group’s parameters, use the modify-db-cluster-parameter-group operation with the following parameters.

  • --db-cluster-parameter-group-name — Required. The name of the cluster parameter group that you are modifying.

  • --parameters — Required. The parameters that you are modifying. For a list of the parameters that apply to all instances in an Amazon DocumentDB cluster, see the Amazon DocumentDB Cluster Parameters Reference. Each parameter entry must include the following:

    • ParameterName — The name of the parameter that you are modifying.

    • ParameterValue — The new value for this parameter.

    • ApplyMethod — How you want changes to this parameter applied. Permitted values are immediate and pending-reboot.

      Note

      Parameters with the ApplyType of static must have an ApplyMethod of pending-reboot.

Example - Modifying a parameter’s value

In this example, you list the parameter values of sample-parameter-group and modify the tls parameter. Then, after waiting 5 minutes, you again list the parameter values of sample-parameter-group to see the changed parameter values.

  1. List the parameters and their values of sample-parameter-group.

    For Linux, macOS, or Unix:

    1. aws docdb describe-db-cluster-parameters \
    2. --db-cluster-parameter-group-name sample-parameter-group

    For Windows:

    1. aws docdb describe-db-cluster-parameters ^
    2. --db-cluster-parameter-group-name sample-parameter-group

    Output from this operation looks something like the following (JSON format).

    1. {
    2. "Parameters": [
    3. {
    4. "Source": "system",
    5. "ApplyType": "static",
    6. "AllowedValues": "disabled,enabled",
    7. "ParameterValue": "enabled",
    8. "ApplyMethod": "pending-reboot",
    9. "DataType": "string",
    10. "ParameterName": "tls",
    11. "IsModifiable": true,
    12. "Description": "Config to enable/disable TLS"
    13. },
    14. {
    15. "Source": "user",
    16. "ApplyType": "dynamic",
    17. "AllowedValues": "disabled,enabled",
    18. "ParameterValue": "enabled",
    19. "ApplyMethod": "pending-reboot",
    20. "DataType": "string",
    21. "ParameterName": "ttl_monitor",
    22. "IsModifiable": true,
    23. "Description": "Enables TTL Monitoring"
    24. }
    25. ]
    26. }
  2. Modify the tls parameter so that its value is disabled .

    You can’t modify the ApplyMethod because the ApplyType is static.

    For Linux, macOS, or Unix:

    1. aws docdb modify-db-cluster-parameter-group \
    2. --db-cluster-parameter-group-name sample-parameter-group \
    3. --parameters "ParameterName"=tls,"ParameterValue"=disabled,"ApplyMethod"=pending-reboot

    For Windows:

    1. aws docdb modify-db-cluster-parameter-group ^
    2. --db-cluster-parameter-group-name sample-parameter-group ^
    3. --parameters "ParameterName"=tls,"ParameterValue"=disabled,"ApplyMethod"=pending-reboot

    Output from this operation looks something like the following (JSON format).

    1. {
    2. "DBClusterParameterGroupName": "sample-parameter-group"
    3. }
  3. Wait at least 5 minutes.

  4. List the parameter values of sample-parameter-group to verify that the tls parameter was modified.

    For Linux, macOS, or Unix:

    1. aws docdb describe-db-cluster-parameters \
    2. --db-cluster-parameter-group-name sample-parameter-group

    For Windows:

    1. aws docdb describe-db-cluster-parameters ^
    2. --db-cluster-parameter-group-name sample-parameter-group

    Output from this operation looks something like the following (JSON format).

    1. {
    2. "Parameters": [
    3. {
    4. "ParameterValue": "false",
    5. "ParameterName": "enable_audit_logs",
    6. "ApplyType": "dynamic",
    7. "DataType": "string",
    8. "Description": "Enables auditing on cluster.",
    9. "AllowedValues": "true,false",
    10. "Source": "system",
    11. "IsModifiable": true,
    12. "ApplyMethod": "pending-reboot"
    13. },
    14. {
    15. "ParameterValue": "disabled",
    16. "ParameterName": "tls",
    17. "ApplyType": "static",
    18. "DataType": "string",
    19. "Description": "Config to enable/disable TLS",
    20. "AllowedValues": "disabled,enabled",
    21. "Source": "system",
    22. "IsModifiable": true,
    23. "ApplyMethod": "pending-reboot"
    24. }
    25. ]
    26. }