Creating a Cluster (AWS CLI)
To create a cluster using the AWS CLI, use the create-cache-cluster
command.
As soon as your cluster becomes available, you're billed for each hour or partial hour that the cluster is active, even if you're not actively using it. To stop incurring charges for this cluster, you must delete it. See Deleting a Cluster.
Topics
Creating a Cache Cluster for Redis (Cluster Mode Disabled) (AWS CLI)
Example – A Redis (cluster mode disabled) Cluster with no read replicas
The following CLI code creates a Redis (cluster mode disabled) cache cluster with no replicas.
For Linux, macOS, or Unix:
aws elasticache create-cache-cluster \ --cache-cluster-id
my-cluster
\ --cache-node-typecache.r4.large
\ --engineredis
\ --engine-version3.2.4
\ --num-cache-nodes1
\ --cache-parameter-groupdefault.redis3.2
\ --snapshot-arnsarn:aws:s3:myS3Bucket/snap.rdb
For Windows:
aws elasticache create-cache-cluster ^ --cache-cluster-id
my-cluster
^ --cache-node-typecache.r4.large
^ --engineredis
^ --engine-version3.2.4
^ --num-cache-nodes1
^ --cache-parameter-groupdefault.redis3.2
^ --snapshot-arnsarn:aws:s3:myS3Bucket/snap.rdb
Creating a Redis (Cluster Mode Enabled) Cluster (AWS CLI)
Redis (cluster mode enabled) clusters (API/CLI: replication groups) cannot be created
using the
create-cache-cluster
operation.
To create a Redis (cluster mode enabled) cluster (API/CLI: replication group),
see Creating a Redis (Cluster Mode Enabled) Replication Group from Scratch (AWS CLI).
For more information, see the AWS CLI for ElastiCache reference topic create-replication-group
.