Creating a cluster - Amazon ElastiCache
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Creating a cluster

The following examples show how to create a cluster using the Amazon Web Services Management Console, Amazon CLI and ElastiCache API.

When you use the Memcached engine, Amazon ElastiCache supports horizontally partitioning your data over multiple nodes. Memcached enables auto discovery so you don't need to keep track of the endpoints for each node. Memcached tracks each node's endpoint, updating the endpoint list as nodes are added and removed. All your application needs to interact with the cluster is the configuration endpoint. For more information on auto discovery, see Automatically identify nodes in your cluster.

To create a Memcachd cluster, follow the steps at Create a cluster

As soon as your cluster's status is available, you can grant Amazon EC2 access to it, connect to it, and begin using it. For more information, see Step 3: Authorize access to the cluster and Step 4: Connect to the cluster's node.

Important

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.

Creating a cluster (Amazon CLI)

To create a cluster using the Amazon CLI, use the create-cache-cluster command.

Important

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.

The following CLI code creates a Memcached cache cluster with 3 nodes.

For Linux, OS X, or Unix:

aws elasticache create-cache-cluster \ --cache-cluster-id my-cluster \ --cache-node-type cache.r4.large \ --engine memcached \ --engine-version 1.4.24 \ --cache-parameter-group default.memcached1.4 \ --num-cache-nodes 3

For Windows:

aws elasticache create-cache-cluster ^ --cache-cluster-id my-cluster ^ --cache-node-type cache.r4.large ^ --engine memcached ^ --engine-version 1.4.24 ^ --cache-parameter-group default.memcached1.4 ^ --num-cache-nodes 3

Creating a cluster (ElastiCache API)

To create a cluster using the ElastiCache API, use the CreateCacheCluster action.

Important

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 using it. To stop incurring charges for this cluster, you must delete it. See Deleting a cluster.

Topics

    The following code creates a Memcached cluster with 3 nodes (ElastiCache API).

    Line breaks are added for ease of reading.

    https://elasticache.us-west-2.amazonaws.com/ ?Action=CreateCacheCluster &CacheClusterId=my-cluster &CacheNodeType=cache.r4.large &Engine=memcached &NumCacheNodes=3 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150508T220302Z &Version=2015-02-02 &X-Amz-Algorithm=&AWS;4-HMAC-SHA256 &X-Amz-Credential=<credential> &X-Amz-Date=20150508T220302Z &X-Amz-Expires=20150508T220302Z &X-Amz-SignedHeaders=Host &X-Amz-Signature=<signature>