Skip to content

What is the different between AWS::ElastiCache::CacheCluster and AWS::ElastiCache::ReplicationGroup

0

I want to create a cluster for Redis with multiple shards, what cloudformation config type can i use.

If use AWS::ElastiCache::CacheCluster, how can i connect it, i have not saw the user group/users parameters in AWS::ElastiCache::CacheCluster

asked a year ago626 views

1 Answer
0

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

answered a year ago

EXPERT

reviewed a year 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.