Elasticache: Cluster mode updates are not supported while attempting to update additional properties


This is the template I used to create elasticache redis. When I try to make any update to this I'm getting an error. The change can be as simple as updating the tag. I have to delete and recreate the db but when I go to production with this we can't do that. What's wrong here?

Error: "Cluster mode updates are not supported while attempting to update additional properties"

AWSTemplateFormatVersion: '2010-09-09'
Description: CloudFormation template to create an Amazon ElastiCache Redis cluster.

    Description: The compute and memory capacity for the nodes in the cluster.
    Type: String
      - cache.t2.micro
    ConstraintDescription: Must select a valid cache node type.
    Description: Replicas per node group
    Type: Number
    Description: Enter the environment
    Type: String
      - "dev"
      - "prod"
    Description: Enter the group this belong to
    Type: String
      - "group1"
      - "group2"
      - "group3"

    ### to do 
    ### add security groups
    ### enable automated backups

    Type: AWS::ElastiCache::ReplicationGroup
      AtRestEncryptionEnabled: false
      AutomaticFailoverEnabled: true
      AutoMinorVersionUpgrade: true
      # CacheSecurityGroupNames: 
      #   - String
      ClusterMode: Disabled
      CacheSubnetGroupName: !Ref CacheSubnetGroup
      CacheNodeType: !Ref CacheNodeType
      DataTieringEnabled: false
      Engine: redis
      IpDiscovery: ipv4
      MultiAZEnabled: true
      NetworkType: ipv4
      NumNodeGroups: 1
      ReplicasPerNodeGroup: !Ref ReplicasPerNodeGroup
      Port: 6379
      PreferredMaintenanceWindow: sun:05:30-sun:06:30
      ReplicationGroupDescription: test
      ReplicationGroupId: test
        - Key: Environment
          Value: !Ref Environment
        - Key: Group
          Value: !Ref Group

    Type: AWS::ElastiCache::SubnetGroup
      Description: ElastiCache Redis Subnet Group
        - !ImportValue redis-subnet-private-a
        - !ImportValue redis-subnet-private-b

    Description: The primary endpoint of the ElastiCache Redis cluster.
    Value: !Join
      - ''
      - - !GetAtt RedisReplicationGroup.PrimaryEndPoint.Address
        - ':'
        - !GetAtt RedisReplicationGroup.PrimaryEndPoint.Port

    Description: The Reader endpoint of the ElastiCache Redis cluster.
    Value: !Join
      - ''
      - - !GetAtt RedisReplicationGroup.ReaderEndPoint.Address
        - ':'
        - !GetAtt RedisReplicationGroup.ReaderEndPoint.Port
asked 10 months ago627 views
3 Answers
Accepted Answer

It appears to be inaccurate CFN documentation for ClusterMode:

The schema resource type AWS::ElastiCache::ReplicationGroup handles looks like using lower case values "enabled or disabled" instead of documented "Enabled or Disabled".

I tested using lower case "enabled" in template allows required update of other properties to be invoked, for instance Tags:

    Type: AWS::ElastiCache::ReplicationGroup
      ClusterMode: enabled
      Engine: redis
      EngineVersion: "6.2"
        - Key: TestTagChange
          Value: changed
answered 6 months ago
  • I had the same issue. The value was set to 'Disabled' when the resource was created. When I tried to modify the resource I got the error noted in op. After changing the value to 'disabled', my update went through. Thanks!


We experienced the same event and responded with the following alternative solution.

Remove (or comment out) the ClusterMode property from the template. When we updated the stack, we confirmed that the other properties could be updated. Note that removing (or commenting out) the ClusterMode property does not change the value of the ClusterMode setting.

I contacted AWS support and they said this is an issue on the infrastructure side.

We have received a report of a CloudFormation issue where, when updating a resource in AWS::ElastiCache::ReplicationGroup, the said error is unexpectedly output even though the ClusterMode property has not been changed.

We have shared a temporary solution, but we encourage you to check with AWS Support for the latest information.

answered 7 months ago

In my case, I am using a custom L2 construct for elasticache. I needed to set automatic failover to true as it had been mistakenly set to true. I tried to set the automatic failover to true, but I ended up with the Elasticache: Cluster mode updates are not supported while attempting to update additional properties error. This response popped up when I googled the error. I updated the cluster mode from the documented Disabled to disabled and deployed that change. Then I updated the automatic failover from false to true and it deployed fine.

I just wanted to make sure there was some google search that might help those struggling with CDK. They're probably using the aws_elasticache module. They might have updated the opensource cdk-redisdb module like I had to do. alternatively, they might be using the L1 construct CfnReplicationGroup in CDK.

answered 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions