- Newest
- Most votes
- Most comments
The key difference between AWS::ElastiCache::CacheCluster and AWS::ElastiCache::ReplicationGroup is their purpose and capabilities:
AWS::ElastiCache::CacheCluster:
- Creates a single ElastiCache cluster
- Cannot be used for creating Valkey clusters
- Does not support multiple shards or replication
- Does not have user group/users parameters
AWS::ElastiCache::ReplicationGroup:
- Creates a replication group that can contain multiple clusters
- Required for Valkey clusters
- Supports both cluster mode disabled (single shard with up to 5 read replicas) and cluster mode enabled (up to 500 shards with 1-5 read replicas each)
- Supports user groups through the UserGroupIds parameter
For creating a Redis cluster with multiple shards, you should use AWS::ElastiCache::ReplicationGroup with cluster mode enabled. This resource type allows you to create a Redis OSS (cluster mode enabled) configuration that supports data partitioning across multiple shards.
To create a multi-shard Redis cluster, you would configure properties like:
- Engine: "redis"
- NumNodeGroups: (number of shards you want)
- ReplicasPerNodeGroup: (number of replicas per shard)
For user authentication, the AWS::ElastiCache::ReplicationGroup resource has a UserGroupIds property that allows you to specify user groups for authentication, which is not available in the CacheCluster resource type.
Sources
AWS::ElastiCache::ReplicationGroup - AWS CloudFormation
Replication: Valkey and Redis OSS Cluster Mode Disabled vs. Enabled - Amazon ElastiCache
Can't create valkey cluster through cloudformation | AWS re:Post
Relevant content
asked 8 years ago
asked 2 years ago
