Skip to content

Cluster Mode Enabled Redis with 2 shards and no replicas fails due to auto failover turned off

0

Description:

While creating an ElastiCache Redis (cluster mode enabled) replication group via CloudFormation with this configuration:

AutomaticFailoverEnabled: false
NumNodeGroups: 2           # 2 shards
ReplicasPerNodeGroup: 0    # no replicas

I receive the following error:

Redis with cluster mode enabled cannot be created with auto failover turned off

Expected behavior: According to AWS documentation, it should be possible to create a cluster-mode-enabled Redis setup with zero replicas, e.g., “90 shards and 0 replicas”. I expected AWS to allow at least a minimal “primary-only” CME deployment for cost-effective or testing purposes.

Actual behavior: CloudFormation (and the ElastiCache API) enforce that for cluster-mode-enabled, AutomaticFailoverEnabled must be true and at least one replica per shard is required. Otherwise, the creation is blocked with the error shown above.

Redis with cluster mode enabled cannot be created with auto failover turned off. (Service: AmazonElastiCache; Status Code: 400; Error Code: InvalidParameterValue; )

Questions The documentation’s description and the actual behavior are inconsistent. So, can I use cluster mode enabled with multiple shards but zero replicas and disable auto‑failover? If the answer is ‘no’, please update the relevant documentation to avoid misleading users.

Thanks so much.

asked 4 months ago114 views
1 Answer
1

The inconsistency you're experiencing is due to a specific constraint with ElastiCache for Redis (cluster mode enabled): you cannot create a cluster mode enabled setup with auto-failover disabled.

While the documentation mentions that you can have "90 shards and 0 replicas" in a cluster mode enabled configuration, there's an important distinction to make. For Valkey or Redis OSS (cluster mode enabled), you can technically have zero replicas per shard, but automatic failover must still be enabled.

The reason for this requirement is that cluster mode enabled is designed with high availability in mind. Even though you can configure it with zero replicas, the automatic failover feature must be enabled as part of the cluster mode enabled architecture. Without replicas, you won't actually be able to failover to a replica if your primary node fails, but the setting must still be enabled.

For your specific use case, if you want to create a cost-effective or testing environment with cluster mode enabled, you must:

  1. Set AutomaticFailoverEnabled to true
  2. You can keep ReplicasPerNodeGroup at 0
  3. Maintain your NumNodeGroups at 2 or whatever number of shards you need

This configuration will allow you to create a cluster mode enabled setup with multiple shards and no replicas, though you should be aware that without replicas, you won't have failover capability despite the setting being enabled.
Sources
Valkey or Redis OSS nodes and shards - Amazon ElastiCache
CreateReplicationGroup - Amazon ElastiCache
ConfigureShard - Amazon ElastiCache

answered 4 months ago
AWS
EXPERT
reviewed 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.