[ aws . elasticache ]
modify-replication-group
Description
Modifies the settings for a replication group. This is limited to Valkey and Redis OSS 7 and above.
- Scaling for Valkey or Redis OSS (cluster mode enabled) in the ElastiCache User Guide
- ModifyReplicationGroupShardConfiguration in the ElastiCache API Reference
Note
This operation is valid for Valkey or Redis OSS only.See also: AWS API Documentation
Synopsis
modify-replication-group
--replication-group-id <value>
[--replication-group-description <value>]
[--primary-cluster-id <value>]
[--snapshotting-cluster-id <value>]
[--automatic-failover-enabled | --no-automatic-failover-enabled]
[--multi-az-enabled | --no-multi-az-enabled]
[--node-group-id <value>]
[--cache-security-group-names <value>]
[--security-group-ids <value>]
[--preferred-maintenance-window <value>]
[--notification-topic-arn <value>]
[--cache-parameter-group-name <value>]
[--notification-topic-status <value>]
[--apply-immediately | --no-apply-immediately]
[--engine <value>]
[--engine-version <value>]
[--auto-minor-version-upgrade | --no-auto-minor-version-upgrade]
[--snapshot-retention-limit <value>]
[--snapshot-window <value>]
[--cache-node-type <value>]
[--auth-token <value>]
[--auth-token-update-strategy <value>]
[--user-group-ids-to-add <value>]
[--user-group-ids-to-remove <value>]
[--remove-user-groups | --no-remove-user-groups]
[--log-delivery-configurations <value>]
[--ip-discovery <value>]
[--transit-encryption-enabled | --no-transit-encryption-enabled]
[--transit-encryption-mode <value>]
[--cluster-mode <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
Options
--replication-group-id (string)
--replication-group-description (string)
--primary-cluster-id (string)
--snapshotting-cluster-id (string)
--automatic-failover-enabled | --no-automatic-failover-enabled (boolean)
Determines whether a read replica is automatically promoted to read/write primary if the existing primary encounters a failure.
Valid values: true | false
--multi-az-enabled | --no-multi-az-enabled (boolean)
--node-group-id (string)
--cache-security-group-names (list)
A list of cache security group names to authorize for the clusters in this replication group. This change is asynchronously applied as soon as possible.
This parameter can be used only with replication group containing clusters running outside of an Amazon Virtual Private Cloud (Amazon VPC).
Constraints: Must contain no more than 255 alphanumeric characters. Must not be Default .
(string)
Syntax:
"string" "string" ...
--security-group-ids (list)
Specifies the VPC Security Groups associated with the clusters in the replication group.
This parameter can be used only with replication group containing clusters running in an Amazon Virtual Private Cloud (Amazon VPC).
(string)
Syntax:
"string" "string" ...
--preferred-maintenance-window (string)
Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period.
Valid values for ddd are:
sunmontuewedthufrisat
Example: sun:23:00-mon:01:30
--notification-topic-arn (string)
The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications are sent.
Note
The Amazon SNS topic owner must be same as the replication group owner.--cache-parameter-group-name (string)
ApplyImmediately parameter is specified as true for this request.--notification-topic-status (string)
The status of the Amazon SNS notification topic for the replication group. Notifications are sent only if the status is active .
Valid values: active | inactive
--apply-immediately | --no-apply-immediately (boolean)
If true , this parameter causes the modifications in this request and any pending modifications to be applied, asynchronously and as soon as possible, regardless of the PreferredMaintenanceWindow setting for the replication group.
If false , changes to the nodes in the replication group are applied on the next maintenance reboot, or the next failure reboot, whichever occurs first.
Valid values: true | false
Default: false
--engine (string)
--engine-version (string)
The upgraded version of the cache engine to be run on the clusters in the replication group.
--auto-minor-version-upgrade | --no-auto-minor-version-upgrade (boolean)
--snapshot-retention-limit (integer)
The number of days for which ElastiCache retains automatic node group (shard) snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted.
--snapshot-window (string)
The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of the node group (shard) specified by SnapshottingClusterId .
Example: 05:00-09:00
If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.
--cache-node-type (string)
--auth-token (string)
Reserved parameter. The password used to access a password protected server. This parameter must be specified with the auth-token-update-strategy parameter. Password constraints:
- Must be only printable ASCII characters
- Must be at least 16 characters and no more than 128 characters in length
- Cannot contain any of the following characters: ‘/’, ‘”’, or ‘@’, ‘%’
For more information, see AUTH password at AUTH .
--auth-token-update-strategy (string)
Specifies the strategy to use to update the AUTH token. This parameter must be specified with the auth-token parameter. Possible values:
- ROTATE - default, if no update strategy is provided
- SET - allowed only after ROTATE
- DELETE - allowed only when transitioning to RBAC
For more information, see Authenticating Users with AUTH
Possible values:
SETROTATEDELETE
--user-group-ids-to-add (list)
The ID of the user group you are associating with the replication group.
(string)
Syntax:
"string" "string" ...
--user-group-ids-to-remove (list)
The ID of the user group to disassociate from the replication group, meaning the users in the group no longer can access the replication group.
(string)
Syntax:
"string" "string" ...
--remove-user-groups | --no-remove-user-groups (boolean)
--log-delivery-configurations (list)
Specifies the destination, format and type of the logs.
(structure)
Specifies the destination, format and type of the logs.
LogType -> (string)
DestinationType -> (string)
cloudwatch-logs or kinesis-firehose as the destination type.DestinationDetails -> (structure)
Configuration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination.
CloudWatchLogsDetails -> (structure)
The configuration details of the CloudWatch Logs destination.
LogGroup -> (string)
KinesisFirehoseDetails -> (structure)
The configuration details of the Kinesis Data Firehose destination.
DeliveryStream -> (string)
LogFormat -> (string)
Enabled -> (boolean)
true .Shorthand Syntax:
LogType=string,DestinationType=string,DestinationDetails={CloudWatchLogsDetails={LogGroup=string},KinesisFirehoseDetails={DeliveryStream=string}},LogFormat=string,Enabled=boolean ...
JSON Syntax:
[
{
"LogType": "slow-log"|"engine-log",
"DestinationType": "cloudwatch-logs"|"kinesis-firehose",
"DestinationDetails": {
"CloudWatchLogsDetails": {
"LogGroup": "string"
},
"KinesisFirehoseDetails": {
"DeliveryStream": "string"
}
},
"LogFormat": "text"|"json",
"Enabled": true|false
}
...
]
--ip-discovery (string)
The network type you choose when modifying a cluster, either ipv4 | ipv6 . IPv6 is supported for workloads using Valkey 7.2 and above, Redis OSS engine version 6.2 to 7.1 and Memcached engine version 1.6.6 and above on all instances built on the Nitro system .
Possible values:
ipv4ipv6
--transit-encryption-enabled | --no-transit-encryption-enabled (boolean)
TransitEncryptionMode to preferred .--transit-encryption-mode (string)
A setting that allows you to migrate your clients to use in-transit encryption, with no downtime.
You must set TransitEncryptionEnabled to true , for your existing cluster, and set TransitEncryptionMode to preferred in the same request to allow both encrypted and unencrypted connections at the same time. Once you migrate all your Valkey or Redis OSS clients to use encrypted connections you can set the value to required to allow encrypted connections only.
Setting TransitEncryptionMode to required is a two-step process that requires you to first set the TransitEncryptionMode to preferred , after that you can set TransitEncryptionMode to required .
Possible values:
preferredrequired
--cluster-mode (string)
Enabled or Disabled. To modify cluster mode from Disabled to Enabled, you must first set the cluster mode to Compatible. Compatible mode allows your Valkey or Redis OSS clients to connect using both cluster mode enabled and cluster mode disabled. After you migrate all Valkey or Redis OSS clients to use cluster mode enabled, you can then complete cluster mode configuration and set the cluster mode to Enabled.
Possible values:
enableddisabledcompatible
--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.
--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.
Global Options
--debug (boolean)
Turn on debug logging.
--endpoint-url (string)
Override command’s default URL with the given URL.
--no-verify-ssl (boolean)
By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.
--no-paginate (boolean)
Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.
--output (string)
The formatting style for command output.
- json
- text
- table
- yaml
- yaml-stream
--query (string)
A JMESPath query to use in filtering the response data.
--profile (string)
Use a specific profile from your credential file.
--region (string)
The region to use. Overrides config/env settings.
--version (string)
Display the version of this tool.
--color (string)
Turn on/off color output.
- on
- off
- auto
--no-sign-request (boolean)
Do not sign requests. Credentials will not be loaded if this argument is provided.
--ca-bundle (string)
The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.
--cli-read-timeout (int)
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.
--cli-connect-timeout (int)
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.
--cli-binary-format (string)
The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.
- base64
- raw-in-base64-out
--no-cli-pager (boolean)
Disable cli pager for output.
--cli-auto-prompt (boolean)
Automatically prompt for CLI input parameters.
--no-cli-auto-prompt (boolean)
Disable automatically prompt for CLI input parameters.
Examples
Note
To use the following examples, you must have the AWS CLI installed and configured. See the Getting started guide in the AWS CLI User Guide for more information.
Unless otherwise stated, all examples have unix-like quotation rules. These examples will need to be adapted to your terminal’s quoting rules. See Using quotation marks with strings in the AWS CLI User Guide .
To modify a replication group
The following modify-replication-group disables Multi-AZ using the Redis engine.
aws elasticache modify-replication-group \
--replication-group-id test-cluster \
--no-multi-az-enabled \
--apply-immediately
Output
{
"ReplicationGroup": {
"ReplicationGroupId": "test-cluster",
"Description": "test-cluster",
"GlobalReplicationGroupInfo": {
"GlobalReplicationGroupId": "sgaui-pat-group",
"GlobalReplicationGroupMemberRole": "PRIMARY"
},
"Status": "available",
"PendingModifiedValues": {},
"MemberClusters": [
"test-cluster-001",
"test-cluster-002",
"test-cluster-003"
],
"NodeGroups": [
{
"NodeGroupId": "0001",
"Status": "available",
"PrimaryEndpoint": {
"Address": "test-cluster.g2xbih.ng.0001.usw2.cache.amazonaws.com",
"Port": 6379
},
"ReaderEndpoint": {
"Address": "test-cluster-ro.g2xbih.ng.0001.usw2.cache.amazonaws.com",
"Port": 6379
},
"NodeGroupMembers": [
{
"CacheClusterId": "test-cluster-001",
"CacheNodeId": "0001",
"ReadEndpoint": {
"Address": "test-cluster-001.g2xbih.0001.usw2.cache.amazonaws.com",
"Port": 6379
},
"PreferredAvailabilityZone": "us-west-2c",
"CurrentRole": "primary"
},
{
"CacheClusterId": "test-cluster-002",
"CacheNodeId": "0001",
"ReadEndpoint": {
"Address": "test-cluster-002.g2xbih.0001.usw2.cache.amazonaws.com",
"Port": 6379
},
"PreferredAvailabilityZone": "us-west-2b",
"CurrentRole": "replica"
},
{
"CacheClusterId": "test-cluster-003",
"CacheNodeId": "0001",
"ReadEndpoint": {
"Address": "test-cluster-003.g2xbih.0001.usw2.cache.amazonaws.com",
"Port": 6379
},
"PreferredAvailabilityZone": "us-west-2a",
"CurrentRole": "replica"
}
]
}
],
"SnapshottingClusterId": "test-cluster-002",
"AutomaticFailover": "enabled",
"MultiAZ": "disabled",
"SnapshotRetentionLimit": 1,
"SnapshotWindow": "08:00-09:00",
"ClusterEnabled": false,
"CacheNodeType": "cache.r5.large",
"TransitEncryptionEnabled": false,
"AtRestEncryptionEnabled": false
}
}
For more information, see Modifying a Replication Group in the Elasticache User Guide.
Output
ReplicationGroup -> (structure)
Contains all of the attributes of a specific Valkey or Redis OSS replication group.
ReplicationGroupId -> (string)
Description -> (string)
GlobalReplicationGroupInfo -> (structure)
The name of the Global datastore and role of this replication group in the Global datastore.
GlobalReplicationGroupId -> (string)
GlobalReplicationGroupMemberRole -> (string)
Status -> (string)
creating , available , modifying , deleting , create-failed , snapshotting .PendingModifiedValues -> (structure)
A group of settings to be applied to the replication group, either immediately or during the next maintenance window.
PrimaryClusterId -> (string)
--apply-immediately was specified), or during the next maintenance window.AutomaticFailoverStatus -> (string)
Resharding -> (structure)
The status of an online resharding operation.
SlotMigration -> (structure)
Represents the progress of an online resharding operation.
ProgressPercentage -> (double)
AuthTokenStatus -> (string)
UserGroups -> (structure)
The user group being modified.
UserGroupIdsToAdd -> (list)
The ID of the user group to add.
(string)
UserGroupIdsToRemove -> (list)
The ID of the user group to remove.
(string)
LogDeliveryConfigurations -> (list)
The log delivery configurations being modified
(structure)
The log delivery configurations being modified
LogType -> (string)
DestinationType -> (string)
DestinationDetails -> (structure)
Configuration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination.
CloudWatchLogsDetails -> (structure)
The configuration details of the CloudWatch Logs destination.
LogGroup -> (string)
KinesisFirehoseDetails -> (structure)
The configuration details of the Kinesis Data Firehose destination.
DeliveryStream -> (string)
LogFormat -> (string)
TransitEncryptionEnabled -> (boolean)
TransitEncryptionMode -> (string)
ClusterMode -> (string)
MemberClusters -> (list)
The names of all the cache clusters that are part of this replication group.
(string)
NodeGroups -> (list)
A list of node groups in this replication group. For Valkey or Redis OSS (cluster mode disabled) replication groups, this is a single-element list. For Valkey or Redis OSS (cluster mode enabled) replication groups, the list contains an entry for each node group (shard).
(structure)
Represents a collection of cache nodes in a replication group. One node in the node group is the read/write primary node. All the other nodes are read-only Replica nodes.
NodeGroupId -> (string)
Status -> (string)
creating , available , modifying , deleting .PrimaryEndpoint -> (structure)
The endpoint of the primary node in this node group (shard).
Address -> (string)
Port -> (integer)
ReaderEndpoint -> (structure)
The endpoint of the replica nodes in this node group (shard). This value is read-only.
Address -> (string)
Port -> (integer)
Slots -> (string)
NodeGroupMembers -> (list)
A list containing information about individual nodes within the node group (shard).
(structure)
Represents a single node within a node group (shard).
CacheClusterId -> (string)
CacheNodeId -> (string)
ReadEndpoint -> (structure)
The information required for client programs to connect to a node for read operations. The read endpoint is only applicable on Valkey or Redis OSS (cluster mode disabled) clusters.
Address -> (string)
Port -> (integer)
PreferredAvailabilityZone -> (string)
PreferredOutpostArn -> (string)
CurrentRole -> (string)
primary or replica . This member is only applicable for Valkey or Redis OSS (cluster mode disabled) replication groups.SnapshottingClusterId -> (string)
AutomaticFailover -> (string)
MultiAZ -> (string)
ConfigurationEndpoint -> (structure)
The configuration endpoint for this replication group. Use the configuration endpoint to connect to this replication group.
Address -> (string)
Port -> (integer)
SnapshotRetentionLimit -> (integer)
The number of days for which ElastiCache retains automatic cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted.
Warning
If the value ofSnapshotRetentionLimit is set to zero (0), backups are turned off.SnapshotWindow -> (string)
The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard).
Example: 05:00-09:00
If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.
Note
This parameter is only valid if theEngine parameter is redis .ClusterEnabled -> (boolean)
A flag indicating whether or not this replication group is cluster enabled; i.e., whether its data can be partitioned across multiple shards (API/CLI: node groups).
Valid values: true | false
CacheNodeType -> (string)
AuthTokenEnabled -> (boolean)
A flag that enables using an AuthToken (password) when issuing Valkey or Redis OSS commands.
Default: false
AuthTokenLastModifiedDate -> (timestamp)
TransitEncryptionEnabled -> (boolean)
A flag that enables in-transit encryption when set to true .
3.2.6 , 4.x or later.Default: false
AtRestEncryptionEnabled -> (boolean)
A flag that enables encryption at-rest when set to true .
You cannot modify the value of AtRestEncryptionEnabled after the cluster is created. To enable encryption at-rest on a cluster you must set AtRestEncryptionEnabled to true when you create a cluster.
3.2.6 , 4.x or later.Default: false
MemberClustersOutpostArns -> (list)
The outpost ARNs of the replication group’s member clusters.
(string)
KmsKeyId -> (string)
ARN -> (string)
UserGroupIds -> (list)
The ID of the user group associated to the replication group.
(string)
LogDeliveryConfigurations -> (list)
Returns the destination, format and type of the logs.
(structure)
Returns the destination, format and type of the logs.
LogType -> (string)
DestinationType -> (string)
cloudwatch-logs or kinesis-firehose .DestinationDetails -> (structure)
Configuration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination.
CloudWatchLogsDetails -> (structure)
The configuration details of the CloudWatch Logs destination.
LogGroup -> (string)
KinesisFirehoseDetails -> (structure)
The configuration details of the Kinesis Data Firehose destination.
DeliveryStream -> (string)
LogFormat -> (string)
Status -> (string)
enabling | disabling | modifying | active | error
Message -> (string)
ReplicationGroupCreateTime -> (timestamp)
DataTiering -> (string)
AutoMinorVersionUpgrade -> (boolean)
NetworkType -> (string)
ipv4 | ipv6 | dual_stack . IPv6 is supported for workloads using Valkey 7.2 and above, Redis OSS engine version 6.2 to 7.1 or Memcached engine version 1.6.6 and above on all instances built on the Nitro system .IpDiscovery -> (string)
ipv4 | ipv6 . IPv6 is supported for workloads using Valkey 7.2 and above, Redis OSS engine version 6.2 to 7.1 or Memcached engine version 1.6.6 and above on all instances built on the Nitro system .TransitEncryptionMode -> (string)
ClusterMode -> (string)
Engine -> (string)
© Copyright 2025, Amazon Web Services. Created using Sphinx.