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

AWS::DAX::Cluster

Use the AWS::DAX::Cluster resource to create a DAX cluster for use with Amazon DynamoDB.

For information about creating a DAX cluster, see Creating a DAX Cluster in the Amazon DynamoDB Developer Guide and CreateCluster in the Amazon DynamoDB Developer Guide.

Syntax

JSON

Copy
{ "Type": "AWS::DAX::Cluster", "Properties": { "AvailabilityZones": [ String, ... ], "ClusterName": String, "Description": String, "IAMRoleARN": String, "NodeType": String, "NotificationTopicARN": String, "ParameterGroupName": String, "PreferredMaintenanceWindow": String, "ReplicationFactor": Integer, "SecurityGroupIds": [ String, ... ], "SubnetGroupName": String, "Tags": { String:String, ... } } }

YAML

Copy
Type: "AWS::DAX::Cluster" Properties: AvailabilityZones: [ String, ... ] ClusterName: String Description: String IAMRoleARN: String NodeType: String NotificationTopicARN: String ParameterGroupName: String PreferredMaintenanceWindow: String ReplicationFactor: Integer SecurityGroupIds: [ String, ... ] SubnetGroupName: String Tags: { String:String, ... }

Properties

AvailabilityZones

The Availability Zones (AZs) in which the cluster nodes will be created. All nodes belonging to the cluster are placed in these Availability Zones. Use this parameter if you want to distribute the nodes across multiple AZs.

You must specify one AZ per DAX node in the cluster.

Required: No

Type: List of strings

Update requires: Some interruptions

ClusterName

The cluster identifier. This parameter is stored as a lowercase string.

Required: No

Type: String

Update requires: Updates are not supported.

Description

A description of the cluster.

Required: No

Type: String

Update requires: No interruption

IAMRoleARN

A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, DAX will assume this role and use the role's permissions to access DynamoDB on your behalf.

Required: Yes

Type: String

Update requires: Updates are not supported.

NodeType

The compute and memory capacity of the nodes in the cluster.

Required: Yes

Type: String

Update requires: Updates are not supported.

NotificationTopicARN

The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications will be sent.

Note

The Amazon SNS topic owner must be same as the DAX cluster owner.

Required: No

Type: String

Update requires: No interruption

ParameterGroupName

The parameter group to be associated with the DAX cluster.

Required: No

Type: String

Update requires: Some interruptions

PreferredMaintenanceWindow

Specifies the weekly time range during which maintenance on the DAX cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid values for ddd are:

  • sun

  • mon

  • tue

  • wed

  • thu

  • fri

  • sat

Example: sun:05:00-sun:09:00

Note

If you don't specify a preferred maintenance window when you create or modify a cache cluster, DAX assigns a 60-minute maintenance window on a randomly selected day of the week.

Required: No

Type: String

Update requires: No interruption

ReplicationFactor

The number of nodes in the DAX cluster. A replication factor of 1 will create a single-node cluster, without any read replicas. For additional fault tolerance, you can create a multiple node cluster with one or more read replicas. To do this, set ReplicationFactor to 2 or more.

Note

AWS recommends that you have at least two read replicas per cluster.

Required: Yes

Type: Integer

Update requires: Some interruptions

SecurityGroupIds

A list of security group IDs to be assigned to each node in the DAX cluster. (Each of the security group ID is system-generated.)

If this parameter is not specified, DAX assigns the default VPC security group to each node.

Required: No

Type: List of strings

Update requires: No interruption

SubnetGroupName

The name of the subnet group to be used for the replication group.

Important

DAX clusters can only run in an Amazon VPC environment. All of the subnets that you specify in a subnet group must exist in the same VPC.

Required: Yes

Type: String

Update requires: Updates are not supported.

Tags

A map of tags to associate with the DAX cluster.

Required: No

Type: String to string map

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 DAX cluster. For example:

Copy
{ "Ref": "MyDAXCluster" }

Returns a value similar to the following:

Copy
MyDAXCluster

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.

Name

Returns the name of the DAX cluster. For example:

Copy
{ "Fn::GetAtt": ["MyDAXCluster", "Arn"] }

Returns a value similar to the following:

Copy
arn:aws:dax:us-east-1:111122223333:cache/MyDAXCluster
ClusterDiscoveryEndpoint

Returns the configuation endpoint of the DAX cluster. For example:

Copy
{ "Fn::GetAtt": ["MyDAXCluster", "ClusterDiscoveryEndpoint"] }

Returns a value similar to the following:

Copy
mydaxcluster.0h3d6x.clustercfg.dax.use1.cache.amazonaws.com:8111

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

Example

The following example creates a DAX cluster.

JSON

Copy
{ "AWSTemplateFormatVersion": "2010-09-09", "DDescription": "Create a DAX cluster", "Resources": { "daxCluster": { "Type": "AWS::DAX::Cluster", "Properties": { "ClusterName": "MyDAXCluster", "NodeType": "dax.r3.large", "ReplicationFactor": 1, "IAMRoleARN": "arn:aws:iam::111122223333:role/DaxAccess", "Description": "DAX cluster created with CloudFormation", "SubnetGroupName": "MySubnetGroup" } }, "subnetGroupClu": { "Type": "AWS::DAX::SubnetGroup", "Properties": { "SubnetGroupName": "MySubnetGroup", "Description": "Subnet group for DAX cluster", "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": { "Cluster": { "Value": "daxCluster" } } }

YAML

Copy
AWSTemplateFormatVersion: "2010-09-09" Description: "Create a DAX cluster" Resources: daxCluster: Type: AWS::DAX::Cluster Properties: ClusterName: "MyDAXCluster" NodeType: "dax.r3.large" ReplicationFactor: 1 IAMRoleARN: "arn:aws:iam::111122223333:role/DaxAccess" Description: "DAX cluster created with CloudFormation" SubnetGroupName: !Ref subnetGroupClu subnetGroupClu: Type: AWS::DAX::SubnetGroup Properties: SubnetGroupName: "CFNClusterSubnetGrp" Description: "Subnet group for DAX cluster" 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: Cluster: Value: !Ref daxCluster