1 Answer
- Newest
- Most votes
- Most comments
2
Hello.
I tried changing from ElastiCache Redis to Valkey below.
ElastiCacheSubnetGroup:
Type: AWS::ElastiCache::SubnetGroup
Properties:
CacheSubnetGroupName: test-cache-subunet
Description: Redis Subnet Group
SubnetIds:
- !Ref PublicSubnet01
- !Ref PublicSubnet02
ElastiCacheCluster:
Type: AWS::ElastiCache::ReplicationGroup
Properties:
CacheNodeType: !Ref ElastiCacheNodeType
CacheSubnetGroupName: !Ref ElastiCacheSubnetGroup
Engine: Redis
EngineVersion: 7.1
MultiAZEnabled: true
NumCacheClusters: 2
Port: 6379
ReplicationGroupDescription: Redis Cluster
ReplicationGroupId: test-elasticache-redis
SecurityGroupIds:
- !Ref ElasticacheSG
Tags:
- Key: Name
Value: test-elasticache-redis
The template used to change to Valkey is as follows.
Please check whether the engine version of the parameter group and "EngineVersion" specified in AWS::ElastiCache::ReplicationGroup match.
ElastiCacheSubnetGroup:
Type: AWS::ElastiCache::SubnetGroup
Properties:
CacheSubnetGroupName: test-cache-subunet
Description: Redis Subnet Group
SubnetIds:
- !Ref PublicSubnet01
- !Ref PublicSubnet02
ElastiCacheCluster:
Type: AWS::ElastiCache::ReplicationGroup
Properties:
CacheNodeType: !Ref ElastiCacheNodeType
CacheParameterGroupName: "default.valkey7" # Edit
CacheSubnetGroupName: !Ref ElastiCacheSubnetGroup
Engine: valkey # Edit
EngineVersion: 7.2 # Edit
MultiAZEnabled: true
NumCacheClusters: 2
Port: 6379
ReplicationGroupDescription: Redis Cluster
ReplicationGroupId: test-elasticache-redis
SecurityGroupIds:
- !Ref ElasticacheSG
Tags:
- Key: Name
Value: test-elasticache-redis
Relevant content
asked 2 years ago
asked a year ago

Hmmm.... I'm not specifying the engine version. Maybe that's important. :thinking:
Since Valkey is from version 7.2, I think that even if it was not specified originally, an error would occur if it was not specified when upgrading.
Yes, adding the "EngineVersion" parameter allowed CFN to update the engine itself. Thanks for the help!