Menu
Amazon ElastiCache
User Guide (API Version 2015-02-02)

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.

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 AWS Management Console and open the ElastiCache console at https://console.aws.amazon.com/elasticache/.

  2. In the left 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 (AWS CLI)

At a command prompt, use the command delete-cache-subnet-group to delete a subnet group.

For Linux, macOS, or Unix:

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

For Windows:

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

This command produces no output.

For more information, see the AWS 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.

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