Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

CreateSubnetGroup - Amazon MemoryDB

CreateSubnetGroup

Creates a subnet group. A subnet group is a collection of subnets (typically private) that you can designate for your clusters running in an Amazon Virtual Private Cloud (VPC) environment. When you create a cluster in an Amazon VPC, you must specify a subnet group. MemoryDB uses that subnet group to choose a subnet and IP addresses within that subnet to associate with your nodes. For more information, see Subnets and subnet groups.

Request Syntax

{ "Description": "string", "SubnetGroupName": "string", "SubnetIds": [ "string" ], "Tags": [ { "Key": "string", "Value": "string" } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Description

A description for the subnet group.

Type: String

Required: No

SubnetGroupName

The name of the subnet group.

Type: String

Required: Yes

SubnetIds

A list of VPC subnet IDs for the subnet group.

Type: Array of strings

Required: Yes

Tags

A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.

Type: Array of Tag objects

Array Members: Maximum number of 200 items.

Required: No

Response Syntax

{ "SubnetGroup": { "ARN": "string", "Description": "string", "Name": "string", "Subnets": [ { "AvailabilityZone": { "Name": "string" }, "Identifier": "string" } ], "VpcId": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

SubnetGroup

The newly-created subnet group.

Type: SubnetGroup object

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidSubnet

HTTP Status Code: 400

ServiceLinkedRoleNotFoundFault

HTTP Status Code: 400

SubnetGroupAlreadyExistsFault

HTTP Status Code: 400

SubnetGroupQuotaExceededFault

HTTP Status Code: 400

SubnetNotAllowedFault

HTTP Status Code: 400

SubnetQuotaExceededFault

HTTP Status Code: 400

TagQuotaPerResourceExceeded

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.