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
Sign in to the AWS Management Console and open the ElastiCache console at https://console.aws.amazon.com/elasticache/.
In the left navigation pane, choose Subnet Groups.
In the list of subnet groups, choose the one you want to delete and then choose Delete.
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 a subnet group.
For Linux, macOS, or Unix:
aws elasticache delete-cache-subnet-group \ --cache-subnet-group-name
aws elasticache delete-cache-subnet-group ^ --cache-subnet-group-name
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
Line breaks in the following code example 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=AWS4-HMAC-SHA256 &X-Amz-Credential=<credential> &X-Amz-Date=20141201T220302Z &X-Amz-Expires=20141201T220302Z &X-Amz-Signature=<signature> &X-Amz-SignedHeaders=Host