Skip to content

Commit eef4554

Browse files
committed
switch to ReplicationGroup for multi AZ support
1 parent 8075cbb commit eef4554

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

service-ecs.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Parameters:
66
CacheNodeType:
77
Type: String
88
Description: The compute and memory capacity of the node(s) in the Redis Cluster
9-
Default: "cache.m3.medium"
9+
Default: "cache.t2.micro"
1010
AllowedValues:
1111
- cache.t2.micro
1212
- cache.t2.small
@@ -43,10 +43,10 @@ Parameters:
4343
- cache.r3.2xlarge
4444
- cache.r3.4xlarge
4545
- cache.r3.8xlarge
46-
AZMode:
46+
AutomaticFailoverEnabled:
4747
Type: String
48-
Description: Cross Availability Zone Redundancy, Requires at least 2 Nodes "cross-az" is on, "single-az" is off
49-
Default: "cross-az"
48+
Description: Indicates whether Multi-AZ is enabled. When Multi-AZ is enabled, a read-only replica is automatically promoted to a read-write primary cluster if the existing primary cluster fails.
49+
Default: "true"
5050

5151
Resources:
5252
ElasticacheSubnetGroup:
@@ -76,17 +76,19 @@ Resources:
7676
Ref: ServiceSecurityGroup
7777

7878
ElasticacheCluster:
79-
Type: "AWS::ElastiCache::CacheCluster"
79+
Type: "AWS::ElastiCache::ReplicationGroup"
8080
Properties:
8181
Engine: "redis"
8282
CacheNodeType:
8383
Ref: CacheNodeType
84-
NumCacheNodes:
84+
NumCacheClusters:
8585
Ref: NumCacheNodes
8686
CacheSubnetGroupName:
8787
Ref: ElasticacheSubnetGroup
88-
AZMode:
89-
Ref: AZMode
90-
VpcSecurityGroupIds:
88+
AutomaticFailoverEnabled:
89+
Ref: AutomaticFailoverEnabled
90+
ReplicationGroupDescription:
91+
Fn::Sub: ${Namespace}-${ServiceName}-${EnvironmentName}-cache
92+
SecurityGroupIds:
9193
- Fn::ImportValue:
9294
Ref: ServiceSecurityGroup

0 commit comments

Comments
 (0)