ElastiCache clusters should not use the default subnet group
Flags ElastiCache clusters using the default subnet group instead of a custom one.
- service
- ElastiCache
- severity
- High
- scope
- evaluated in every region
How to fix it
Set at creation: fixing it means replacing the resource.
Move the cluster onto a subnet group of your own instead of the one called default. A cluster's subnet group is fixed at creation and no modify operation accepts a different one, so this is a replacement: create the subnet group, back the cluster up, restore into a new cluster in it, repoint every client at the new endpoint, then delete the old one. Memcached has no snapshots, so it is recreated empty. A member of a replication group cannot be moved alone; replace the group.
In the console
ElastiCache → Subnet groups → Create subnet group, then the Subnet group setting on the replacement cache
With Terraform
resource "aws_elasticache_cluster" "this" {
cluster_id = var.cluster_id
engine = var.engine
subnet_group_name = aws_elasticache_subnet_group.custom.name
}
See which of your accounts this check is failing on.
Book a demo