Creates a redis cache via elasticache

This module creates a redis cache via elasticache. It is made with one failover instance across AZs, and is encrypted at rest with a kms key created in the env setup via the init macro and in transit via tls. It is made in the private subnets created by the _init macro and so can only be accessed in the VPC or through some proxy (e.g. VPN).


When linked to a k8s-service, it adds connection credentials to your container’s environment variables

  • {module_name}_cache_auth_token – The auth token/password of the cluster.
  • {module_name}_cache_host – The host to contact to access the cluster.

In the modules reference, the {module_name} would be replaced with cache

The permission list can optionally have one entry which should be a map for renaming the default environment variable names to a user-defined value:

  - db:
      - cache_host: CACHEHOST
        cache_auth_token: CACHEAUTH

If present, this map must have renames for all 2 fields.


Redis CLI will not work against this cluster because redis cli does not support the TLS transit encryption. There should be no trouble with any of the language sdks however, as they all support TLS.


Name Description Default Required
node_type This is the redis instance type used for the instances. cache.m4.large False
redis_version the redis version to use for this instance 6.x False
snapshot_retention_limit Retentions days for which the snapshot will be retained. 0 False
snapshot_window Window during which the snapshot would be taken. 04:00-05:00 False


Name Description
cache_host The host through which to access the redis cache