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

Modifying a Subnet Group

You can modify a subnet group's description, or modify the list of subnet IDs associated with the subnet group. You cannot delete a subnet ID from a subnet group if a cluster is currently using that subnet.

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

Modifying Subnet Groups (Console)

To modify 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, select the one you want to modify.

  4. In the lower portion of the ElastiCache console, make any changes to the description or the list of subnet IDs for the subnet group. To save your changes, choose Save.

Modifying Subnet Groups (AWS CLI)

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

For Linux, macOS, or Unix:

Copy
aws elasticache modify-cache-subnet-group \ --cache-subnet-group-name mysubnetgroup \ --cache-subnet-group-description "New description" \ --subnet-ids subnet-42df9c3a,subnet-48fc21a9

For Windows:

Copy
aws elasticache modify-cache-subnet-group ^ --cache-subnet-group-name mysubnetgroup ^ --cache-subnet-group-description "New description" ^ --subnet-ids subnet-42df9c3a,subnet-48fc21a9

This command should produce output similar to the following:

Copy
SUBNETGROUP mysubnetgroup Testing vpc-5a2e4c35 SUBNET subnet-42df9c3a us-west-2b SUBNET subnet-48fc21a9 us-west-2b

For more information, see the AWS CLI topic modify-cache-subnet-group.

Modifying Subnet Groups (ElastiCache API)

Using the ElastiCache API, call ModifyCacheSubnetGroup with the following parameters:

  • CacheSubnetGroupName=mysubnetgroup
  • Any other parameters whose values you want to change. This example uses CacheSubnetGroupDescription=New%20description to change the description of the subnet group.

Example

Copy
https://elasticache.us-west-2.amazonaws.com/ ?Action=ModifyCacheSubnetGroup &CacheSubnetGroupDescription=New%20description &CacheSubnetGroupName=mysubnetgroup &SubnetIds.member.1=subnet-42df9c3a &SubnetIds.member.2=subnet-48fc21a9 &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

Note

When you create a new subnet group, take note the number of available IP addresses. If the subnet has very few free IP addresses, you might be constrained as to how many more nodes you can add to the cluster. To resolve this issue, you can assign one or more subnets to a subnet group so that you have a sufficient number of IP addresses in your cluster's Availability Zone. After that, you can add more nodes to your cluster.