AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::ElastiCache::SubnetGroup

CfnSubnetGroup

Creates a cache subnet group. For more information about cache subnet groups, go to Cache Subnet Groups in the *Amazon ElastiCache User Guide* or go to [CreateCacheSubnetGroup](https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateCacheSubnetGroup.html) in the *Amazon ElastiCache API Reference Guide* .

Import

import { CfnSubnetGroup } from 'aws-cdk-lib/aws-elasticache';

Or use the module namespace:

import * as elasticache from 'aws-cdk-lib/aws-elasticache';
// elasticache.CfnSubnetGroup

Properties

Configuration passed to the constructor as CfnSubnetGroupProps.

descriptionRequired
string

The description for the cache subnet group.

subnetIdsRequired
string | ISubnetRef[]

The EC2 subnet IDs for the cache subnet group.

cacheSubnetGroupNameOptional
string

The name for the cache subnet group. This value is stored as a lowercase string. Constraints: Must contain no more than 255 alphanumeric characters or hyphens. Example: `mysubnetgroup`

tagsOptional
CfnTag[]

A tag that can be added to an ElastiCache subnet group. Tags are composed of a Key/Value pair. You can use tags to categorize and track all your subnet groups. A tag with a null Value is permitted.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter