Modifying Amazon DocumentDB cluster parameter groups
This section explains how to modify a custom Amazon DocumentDB parameter group.
In Amazon DocumentDB, you cannot modify a default cluster parameter group which is created when you first create a cluster with new engine version in a new region.
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 custom cluster parameter group.
Modify actions could take a while to propagate.
Please wait for the modified cluster paramater group to be available before attaching it to your cluster.
You can use the Amazon Web Services Management Console or the Amazon CLI describe-db-cluster-parameters operation to verify that your cluster parameter group has been modified.
For more information, see Describing cluster parameter groups.
- Using the Amazon Web Services Management Console
-
Follow these steps to modify a custom Amazon DocumentDB parameter group. You can't modify a
defaultparameter group. If you want to modify a value in thedefaultparameter 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
Sign in to the Amazon Web Services Management Console, and open the Amazon DocumentDB console at https://console.amazonaws.cn/docdb
. 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 (
)
in the upper-left corner of the page.For each parameter in the parameter group that you want to modify, do the following:
Locate the parameter that you want to modify, and verify that it is modifiable by checking if it is listed as
trueunder the Modifiable column.If it is modifiable, select the parameter and choose Edit from the top right of the console page.
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.
- Using the Amazon CLI
-
You can modify the
ParameterValue,Description, orApplyMethodof any modifiable parameter in a custom Amazon DocumentDB cluster parameter group using the Amazon 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-groupoperation 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 areimmediateandpending-reboot.Note
Parameters with the
ApplyTypeofstaticmust have anApplyMethodofpending-reboot.
-
Example - Modifying a parameter's value
In this example, you list the parameter values of
sample-parameter-groupand modify thetlsparameter. Then, after waiting 5 minutes, you again list the parameter values ofsample-parameter-groupto see the changed parameter values.-
List the parameters and their values of
sample-parameter-group.For Linux, macOS, or Unix:
aws docdb describe-db-cluster-parameters \ --db-cluster-parameter-group-namesample-parameter-groupFor Windows:
aws docdb describe-db-cluster-parameters ^ --db-cluster-parameter-group-namesample-parameter-groupOutput from this operation looks something like the following (JSON format).
{ "Parameters": [ { "Source": "system", "ApplyType": "static", "AllowedValues": "disabled,enabled", "ParameterValue": "enabled", "ApplyMethod": "pending-reboot", "DataType": "string", "ParameterName": "tls", "IsModifiable": true, "Description": "Config to enable/disable TLS" }, { "Source": "user", "ApplyType": "dynamic", "AllowedValues": "disabled,enabled", "ParameterValue": "enabled", "ApplyMethod": "pending-reboot", "DataType": "string", "ParameterName": "ttl_monitor", "IsModifiable": true, "Description": "Enables TTL Monitoring" } ] } -
Modify the
tlsparameter so that its value isdisabled.You can't modify the
ApplyMethodbecause theApplyTypeisstatic.For Linux, macOS, or Unix:
aws docdb modify-db-cluster-parameter-group \ --db-cluster-parameter-group-namesample-parameter-group\ --parameters "ParameterName"=tls,"ParameterValue"=disabled,"ApplyMethod"=pending-rebootFor Windows:
aws docdb modify-db-cluster-parameter-group ^ --db-cluster-parameter-group-namesample-parameter-group^ --parameters "ParameterName"=tls,"ParameterValue"=disabled,"ApplyMethod"=pending-rebootOutput from this operation looks something like the following (JSON format).
{ "DBClusterParameterGroupName": "sample-parameter-group" } -
Wait at least 5 minutes.
-
List the parameter values of
sample-parameter-groupto verify that thetlsparameter was modified.For Linux, macOS, or Unix:
aws docdb describe-db-cluster-parameters \ --db-cluster-parameter-group-namesample-parameter-groupFor Windows:
aws docdb describe-db-cluster-parameters ^ --db-cluster-parameter-group-namesample-parameter-groupOutput from this operation looks something like the following (JSON format).
{ "Parameters": [ { "ParameterValue": "false", "ParameterName": "enable_audit_logs", "ApplyType": "dynamic", "DataType": "string", "Description": "Enables auditing on cluster.", "AllowedValues": "true,false", "Source": "system", "IsModifiable": true, "ApplyMethod": "pending-reboot" }, {"ParameterValue": "disabled","ParameterName": "tls", "ApplyType": "static", "DataType": "string", "Description": "Config to enable/disable TLS", "AllowedValues": "disabled,enabled", "Source": "system", "IsModifiable": true, "ApplyMethod": "pending-reboot" } ] }
-