Deleting a subnet group - Amazon ElastiCache for Redis
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.

Deleting a subnet group

If you decide that you no longer need your subnet group, you can delete it. You cannot delete a subnet group if it is currently in use by a cluster. You also cannot delete a subnet group on a cluster with Multi-AZ enabled if doing so leaves that cluster with fewer than two subnets. You must first disable Multi-AZ and then delete the subnet.

The following procedures show you how to delete a subnet group.

Deleting a subnet group (Console)

To delete a subnet group

  1. Sign in to the Amazon Web Services Management Console and open the ElastiCache console at https://console.amazonaws.cn/elasticache/.

  2. In the navigation pane, choose Subnet Groups.

  3. In the list of subnet groups, choose the one you want to delete and then choose Delete.

  4. When you are asked to confirm this operation, choose Yes, Delete.

Deleting a subnet group (Amazon CLI)

Using the Amazon CLI, call the command delete-cache-subnet-group with the following parameter:

  • --cache-subnet-group-name mysubnetgroup

For Linux, OS X, or Unix:

aws elasticache delete-cache-subnet-group \ --cache-subnet-group-name mysubnetgroup

For Windows:

aws elasticache delete-cache-subnet-group ^ --cache-subnet-group-name mysubnetgroup

This command produces no output.

For more information, see the Amazon CLI topic delete-cache-subnet-group.

Deleting a subnet group (ElastiCache API)

Using the ElastiCache API, call DeleteCacheSubnetGroup with the following parameter:

  • CacheSubnetGroupName=mysubnetgroup

Example

Line breaks are added for ease of reading.

https://elasticache.us-west-2.amazonaws.com/ ?Action=DeleteCacheSubnetGroup &CacheSubnetGroupName=mysubnetgroup &SignatureMethod=HmacSHA256 &SignatureVersion=4 &Timestamp=20141201T220302Z &Version=2014-12-01 &X-Amz-Algorithm=&AWS;4-HMAC-SHA256 &X-Amz-Credential=<credential> &X-Amz-Date=20141201T220302Z &X-Amz-Expires=20141201T220302Z &X-Amz-Signature=<signature> &X-Amz-SignedHeaders=Host

This command produces no output.

For more information, see the ElastiCache API topic DeleteCacheSubnetGroup.