Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::DAX::SubnetGroup

Use the AWS CloudFormation AWS::DAX::SubnetGroup resource to create a subnet group for use with DAX (DynamoDB Accelerator).

For more information, see SubnetGroup in the Amazon DynamoDB Developer Guide.

Syntax

JSON

Copy
{ "Type": "AWS::DAX::SubnetGroup", "Properties": { "SubnetGroupName": String, "Description": String, "SubnetIds": [ String, ... ] } }

YAML

Copy
Type: "AWS::DAX::SubnetGroup" Properties: SubnetGroupName: String Description: String SubnetIds: [ String, ... ]

Properties

SubnetGroupName

The name of the subnet group.

Required: No

Type: String

Update requires: Updates are not supported.

Description

The description of the subnet group.

Required: No

Type: String

Update requires: No interruption

SubnetIds

A list of subnets associated with the subnet group.

Required: No

Type: List of strings;

Update requires: No interruption

Return Values

Ref

When you provide the logical ID of this resource to the Ref intrinsic function, Ref returns the ARN of the created activity. For example:

Copy
{ "Ref": "MyDAXSubnetGroup" }

Returns a value similar to the following:

Copy
my-dax-subnet-group

For more information about using the Ref function, see Ref.

Fn::GetAtt

Fn::GetAtt returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

SubnetGroupName

Returns the name of the subnet group. For example:

Copy
{ "Fn::GetAtt": ["MyDAXSubnetGroup", "SubnetGroupName"] }

Returns a value similar to the following:

Copy
my-dax-subnet-group

For more information about using Fn::GetAtt, see Fn::GetAtt.

Example

The following example creates a DAX subnet group.

JSON

Copy
{ "AWSTemplateFormatVersion": "2010-09-09", "Description": "Create a DAX subnet group", "Resources": { "MyDAXSubnetGroup": { "Type": "AWS::DAX::SubnetGroup", "Properties": { "SubnetGroupName": "my-dax-subnet-group", "Description": "Description of my DAX subnet group", "SubnetIds": [ "subnet1", "subnet2" ] } }, "subnet1": { "Type": "AWS::EC2::Subnet", "Properties": { "VpcId": "daxVPC", "CidrBlock": "172.13.17.0/24", "AvailabilityZone": { "Fn::Select": [ 0, { "Fn::GetAZs": "" } ] } } }, "subnet2": { "Type": "AWS::EC2::Subnet", "Properties": { "VpcId": "daxVPC", "CidrBlock": "172.13.18.0/24", "AvailabilityZone": { "Fn::Select": [ 1, { "Fn::GetAZs": "" } ] } } }, "daxVpc": { "Type": "AWS::EC2::VPC", "Properties": { "CidrBlock": "172.13.0.0/16" } } }, "Outputs": { "ParameterGroup": { "Value": "MyDAXSubnetGroup" } } }

YAML

Copy
AWSTemplateFormatVersion: "2010-09-09" Description: "DAX subnet group" Resources: MyDAXSubnetGroup: Type: AWS::DAX::SubnetGroup Properties: SubnetGroupName: "my-dax-subnet-group" Description: "Description of my DAX subnet group" SubnetIds: - !Ref subnet1 - !Ref subnet2 subnet1: Type: AWS::EC2::Subnet Properties: VpcId: !Ref daxVpc CidrBlock: 172.13.17.0/24 AvailabilityZone: Fn::Select: - 0 - Fn::GetAZs: "" subnet2: Type: AWS::EC2::Subnet Properties: VpcId: !Ref daxVpc CidrBlock: 172.13.18.0/24 AvailabilityZone: Fn::Select: - 1 - Fn::GetAZs: "" daxVpc: Type: AWS::EC2::VPC Properties: CidrBlock: 172.13.0.0/16 Outputs: ParameterGroup: Value: !Ref MyDAXSubnetGroup