diff --git a/service-ecs.yml b/service-ecs.yml index 32c330b..35374a7 100644 --- a/service-ecs.yml +++ b/service-ecs.yml @@ -6,7 +6,7 @@ Parameters: CacheNodeType: Type: String Description: The compute and memory capacity of the node(s) in the Redis Cluster - Default: "cache.m3.medium" + Default: "cache.t2.micro" AllowedValues: - cache.t2.micro - cache.t2.small @@ -43,10 +43,10 @@ Parameters: - cache.r3.2xlarge - cache.r3.4xlarge - cache.r3.8xlarge - AZMode: + AutomaticFailoverEnabled: Type: String - Description: Cross Availability Zone Redundancy, Requires at least 2 Nodes "cross-az" is on, "single-az" is off - Default: "cross-az" + 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. + Default: "true" Resources: ElasticacheSubnetGroup: @@ -76,17 +76,19 @@ Resources: Ref: ServiceSecurityGroup ElasticacheCluster: - Type: "AWS::ElastiCache::CacheCluster" + Type: "AWS::ElastiCache::ReplicationGroup" Properties: Engine: "redis" CacheNodeType: Ref: CacheNodeType - NumCacheNodes: + NumCacheClusters: Ref: NumCacheNodes CacheSubnetGroupName: Ref: ElasticacheSubnetGroup - AZMode: - Ref: AZMode - VpcSecurityGroupIds: + AutomaticFailoverEnabled: + Ref: AutomaticFailoverEnabled + ReplicationGroupDescription: + Fn::Sub: ${Namespace}-${ServiceName}-${EnvironmentName}-cache + SecurityGroupIds: - Fn::ImportValue: Ref: ServiceSecurityGroup