AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::DocDB::DBSubnetGroup

CfnDBSubnetGroup

The `AWS::DocDB::DBSubnetGroup` Amazon DocumentDB (with MongoDB compatibility) resource describes a DBSubnetGroup. subnet groups must contain at least one subnet in at least two Availability Zones in the AWS Region . For more information, see [DBSubnetGroup](https://docs.aws.amazon.com/documentdb/latest/developerguide/API_DBSubnetGroup.html) in the *Amazon DocumentDB Developer Guide* .

Import

import { CfnDBSubnetGroup } from 'aws-cdk-lib/aws-docdb';

Or use the module namespace:

import * as docdb from 'aws-cdk-lib/aws-docdb';
// docdb.CfnDBSubnetGroup

Properties

Configuration passed to the constructor as CfnDBSubnetGroupProps.

dbSubnetGroupDescriptionRequired
string

The description for the subnet group.

subnetIdsRequired
string[]

The Amazon EC2 subnet IDs for the subnet group.

dbSubnetGroupNameOptional
string

The name for the subnet group. This value is stored as a lowercase string. Constraints: Must contain no more than 255 letters, numbers, periods, underscores, spaces, or hyphens. Must not be default. Example: `mySubnetgroup`

tagsOptional
CfnTag[]

The tags to be assigned to the subnet group.

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