ElastiCache
Guide for understanding and configuring an ElastiCache stack
The ElastiCache stack is an add-on AWS ElastiCache (Valkey) caching layer deployed into an existing network.
Variables
Note:
Backend stateful services (like caching clusters) should be isolated from direct internet access on private subnets. Provide the data_subnets variable when creating the stack to specify the subnets to deploy into. See Configuration
for details.
| Variable Name | Type | Description |
|---|---|---|
region | string | (Required) The region to deploy the ElastiCache replication groups — must match the data_subnets region. |
name | string | (Required) Replication groups are identified by <name>-<cache> (maximum 40 characters). |
size | string | (Required) Plan size. Must be one of dev, micro, mini, small, medium, large, or xlarge. |
↳dev | cache.t4g.micro | |
↳micro | cache.t4g.micro | |
↳mini | cache.t4g.micro | |
↳small | cache.t4g.medium | |
↳medium | cache.m7g.large | |
↳large | cache.r7g.large | |
↳xlarge | cache.r7g.xlarge | |
data_subnets | list(string) | (Required) Array of subnet IDs [primary, secondary]. May also be a reference to another stack’s output. |
caches | list(string) | Optional. Names of the Valkey replication groups to create. Each name must contain only lowercase letters, digits, and hyphens, and cannot start or end with a hyphen. Defaults to ["volatile", "persistent"]. |
valkey_version | string | Optional. Valkey engine version. The major version selects the default parameter group. Defaults to "8.0". |
Example:
{
"type": "elasticache",
"environment": "/v2/environments/tu8aovkn7waj",
"service": "/v2/services/2tpkjj7e0b28",
"name": "my-store",
"variables": {
"size": "medium",
"region": "us-east-1",
"data_subnets": "/v2/stacks/4d4d1d4koe12/outputs/data_subnets",
"caches": [
"volatile",
"persistent"
]
}
}
Outputs
| Output name | Description |
|---|---|
valkey_endpoints | Map of cache name to its primary endpoint address (e.g., volatile, persistent). |
valkey_port | The port every Valkey cache listens on (6379). |
Have questions not answered here?
Contact Support
to get more help.
Last modified on September 24, 2026