DeleteReplicationGroup - Amazon ElastiCache
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Deletes an existing replication group. By default, this operation deletes the entire replication group, including the primary/primaries and all of the read replicas. If the replication group has only one primary, you can optionally delete only the read replicas, while retaining the primary by setting RetainPrimaryCluster=true.

When you receive a successful response from this operation, Amazon ElastiCache immediately begins deleting the selected resources; you cannot cancel or revert this operation.


This operation is valid for Redis only.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.


The identifier for the cluster to be deleted. This parameter is not case sensitive.

Type: String

Required: Yes


The name of a final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the replication group is immediately deleted.

Type: String

Required: No


If set to true, all of the read replicas are deleted, but the primary node is retained.

Type: Boolean

Required: No

Response Elements

The following element is returned by the service.


Contains all of the attributes of a specific Redis replication group.

Type: ReplicationGroup object


For information about the errors that are common to all actions, see Common Errors.


Two or more incompatible parameters were specified.

HTTP Status Code: 400


The value for a parameter is invalid.

HTTP Status Code: 400


The requested replication group is not in the available state.

HTTP Status Code: 400


The specified replication group does not exist.

HTTP Status Code: 404


You already have a snapshot with the given name.

HTTP Status Code: 400


You attempted one of the following operations:

  • Creating a snapshot of a Redis cluster running on a cache.t1.micro cache node.

  • Creating a snapshot of a cluster that is running Memcached rather than Redis.

Neither of these are supported by ElastiCache.

HTTP Status Code: 400


The request cannot be processed because it would exceed the maximum number of snapshots.

HTTP Status Code: 400



This example illustrates one usage of DeleteReplicationGroup.

Sample Request ?Action=DeleteReplicationGroup &RetainPrimaryCluster=false &FinalSnapshotIdentifier=my-final-snapshot &ReplicationGroupId=my-repgroup &Version=2015-02-02 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &X-Amz-Credential=<credential>

Sample Response

<DeleteReplicationGroupResponse xmlns=""> <DeleteReplicationGroupResult> <ReplicationGroup> <SnapshottingClusterId>my-redis-primary</SnapshottingClusterId> decrease-replica-count <ReplicationGroupId>my-repgroup</ReplicationGroupId> <Status>deleting</Status> <PendingModifiedValues /> <Description>My replication group</Description> </ReplicationGroup> </DeleteReplicationGroupResult> <ResponseMetadata> <RequestId>93eb37db-b9d7-11e3-8a16-7978bb24ffdf</RequestId> </ResponseMetadata> </DeleteReplicationGroupResponse>

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: