Step 1: Create a subnet group - Amazon ElastiCache for Redis

Step 1: Create a subnet group

The following procedures show you how to create a subnet group called mysubnetgroup (console) and the AWS CLI.

The following procedure shows how to create a subnet group (console).

To create a subnet group (Console)
  1. Sign in to the AWS Management Console, and open the ElastiCache console at https://console.aws.amazon.com/elasticache/.

  2. In the navigation list, choose Subnet Groups.

  3. Choose Create Subnet Group.

  4. In the Create Subnet Group wizard, do the following. When all the settings are as you want them, choose Yes, Create.

    1. In the Name box, type a name for your subnet group.

    2. In the Description box, type a description for your subnet group.

    3. In the VPC ID box, choose the Amazon VPC that you created.

    4. In the Availability Zone and Subnet ID lists, choose the Availability Zone or Local Zone and ID of your private subnet, and then choose Add.

      
									Image: Create Subnet VPC screen
  5. In the confirmation message that appears, choose Close.

Your new subnet group appears in the Subnet Groups list of the ElastiCache console. At the bottom of the window you can choose the subnet group to see details, such as all of the subnets associated with this group.

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

For Linux, macOS, or Unix:

aws elasticache create-cache-subnet-group \ --cache-subnet-group-name mysubnetgroup \ --cache-subnet-group-description "Testing" \ --subnet-ids subnet-53df9c3a

For Windows:

aws elasticache create-cache-subnet-group ^ --cache-subnet-group-name mysubnetgroup ^ --cache-subnet-group-description "Testing" ^ --subnet-ids subnet-53df9c3a

This command should produce output similar to the following:

{ "CacheSubnetGroup": { "VpcId": "vpc-37c3cd17", "CacheSubnetGroupDescription": "Testing", "Subnets": [ { "SubnetIdentifier": "subnet-53df9c3a", "SubnetAvailabilityZone": { "Name": "us-west-2a" } } ], "CacheSubnetGroupName": "mysubnetgroup" } }

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