ElastiCache replication groups should have automatic failover enabled
Checks that ElastiCache (Redis OSS or Valkey) replication groups have automatic failover enabled, so a read replica is promoted when the primary fails and writes resume within seconds instead of waiting for a new primary. A group whose only node is its primary must add a read replica before failover can be enabled.
- service
- ElastiCache
- severity
- Medium
- scope
- evaluated in every region
How to fix it
In the console
ElastiCache → Valkey caches or Redis OSS caches → the cache → Actions → Modify
- Auto failover
- Enable
- Multi-AZ
- Enable, recommended, so the replica it fails over to is in another Availability Zone
With the AWS CLI
- Interrupts service: --apply-immediately also applies any pending change to the group now, such as a node type or engine version change, which can replace nodes.
aws elasticache modify-replication-group --replication-group-id <replication-group-id> --automatic-failover-enabled --apply-immediately --region <region>With Terraform
resource "aws_elasticache_replication_group" "this" {
replication_group_id = var.replication_group_id
description = var.description
num_cache_clusters = var.num_cache_clusters
automatic_failover_enabled = true
}
See which of your accounts this check is failing on.
Book a live scan