@shinyaz

ElastiCache for Valkey requires CreateReplicationGroup, not CreateCacheCluster

1 min read

Hit this while setting up a node-based ElastiCache for Valkey cluster for JDBC Wrapper cache testing.

Tried create-cache-cluster like I would for Redis OSS — didn't work.

Terminal
aws elasticache create-cache-cluster \
  --cache-cluster-id my-valkey \
  --engine valkey \
  --cache-node-type cache.t3.micro \
  --num-cache-nodes 1
Output
An error occurred (InvalidParameterValue) when calling the CreateCacheCluster
operation: This API doesn't support Valkey engine. Please use
CreateReplicationGroup API for Valkey cluster creation.

Valkey requires create-replication-group even for a single node.

Terminal
aws elasticache create-replication-group \
  --replication-group-id my-valkey \
  --replication-group-description "Single node Valkey" \
  --engine valkey \
  --cache-node-type cache.t3.micro \
  --num-cache-clusters 1 \
  --no-transit-encryption-enabled

The error message is helpful enough, but easy to miss when migrating scripts from Redis OSS.

Share this post

Shinya Tahara

Shinya Tahara

Solutions Architect @ AWS

I'm a Solutions Architect at AWS, providing technical guidance primarily to financial industry customers. I share learnings about cloud architecture and AI/ML on this site.The views and opinions expressed on this site are my own and do not represent the official positions of my employer.