Cache Cluster

Cache Cluster nodes provision Redis clusters to provide fast, in-memory data caching.

The cluster is fully-managed, including multi-availability-zone failover and automatic minor version updates. The Redis version currently supported is 3.2.

Up to five read-only replicas may be provisioned. Replicas facilitate horizontal scalability for read-only operations and, where available, high-availability failover protection. For instance types other than cache.t2, when the primary Redis node fails a replica is promoted to be the new primary, and the primary DNS record is updated to point to the new primary Redis node.

Once a cluster has been provisioned its primary and replica DNS names can be found in the deployment status info pane for the node.

Message Formats


Redis commands may be executed by sending messages from Function nodes to Cache Cluster nodes. The messages are arrays where the first item is the command name and subsequent items are the arguments to the command. Examples:

["set", "foo", "bar"] // Set key 'foo' to value 'bar'
["get", "foo"]        // Get the value of key 'foo'

Each Function invocation maintains a persistent connection to the Cache Cluster. This allows for multi-command transactions:

.then(() => output(['incr', 'myval']))
.then(() => output(['get', 'myval']))
.then(() => output(['exec']))

Argument values can include binary data when provided as Buffer objects.


The response message contains the result of the executed command.

By default, responses are coerced into UTF-8 strings. This conversion mangles unicode-incompatible binary data. Instead, responses can be received as Buffer objects by setting an output call option:

output(['get', 'myBinaryValue'], {binary: true})



A label used for the node in the canvas.

Instance Type

The AWS Instance Type of the cache nodes.

Note: High-availability failover of the primary node is not supported for cache.t2 instance types. For these types, when the primary node fails it is replaced. During the replacement time replica nodes may be used for read-only operations, but write operations must wait until the replacement node becomes available.

Read Replicas

The number of Redis cache nodes provisioned as read-only replicas.

For instance types other than cache.t2, read-only replicas can be promoted to the primary node when the primary node fails. This provides high-availability failover protection as it reduces the time to recover versus replacing the primary node with a new instance.

Referenceable Properties

The following properties may be referenced by Function and Docker Service nodes:

Property Value Example
id Cloud Service Identifier arn:aws:elasticache:us-east-1:0123456789012:cluster:sd893j3hdkk
address Primary Node Address
port Primary Node Port 6379
replicaAddressesList Read-Only Replica Addresses (JSON) ["",""]
replicaPortsList Read-Only Replica Addresses (JSON), in the same order as the addresses list [6379, 6379]


Cache Clusters must be placed within Virtual Networks. Cluster nodes are placed in the private subnets of the Virtual Network to provide network-level access protection.

Try Stackery For Free

Gain control and visibility of your serverless operations from architecture design to application deployment and infrastructure monitoring.