A Redis Resource is defined in convox.yml
and linked to one or more Services.
resources:
main:
type: redis
services:
web:
resources:
- main
In addition to containerized resources, Convox v3 allows the creation of Redis resources via AWS ElastiCache. This provides enhanced durability and managed service benefits. Below is a general example of how to define AWS ElastiCache Redis resources:
resources:
cache:
type: elasticache-redis
options:
class: cache.t3.micro
version: 6.2
deletionProtection: true
durable: true
encrypted: true
autoMinorVersionUpgrade: true
transitEncryption: true
services:
web:
resources:
- cache
Below is a chart of configuration options available for AWS ElastiCache Redis resources:
Attribute | Type | Description |
---|---|---|
class | string | The compute and memory capacity of the cache instance. |
version | string | The version of the cache engine. |
deletionProtection | boolean | Whether to enable deletion protection for the cache instance. |
durable | boolean | Whether to create a Multi-AZ cache instance. |
encrypted | boolean | Whether to enable encryption at rest for the cache instance. |
transitEncryption | boolean | Whether to enable in-transit encryption for securing data flow between applications and cache. |
autoMinorVersionUpgrade | boolean | Whether to allow automatic minor version upgrades for the cache engine. |
import | string | The cache identifier used for cache import. |
Important: The
deletionProtection
option is managed by Convox and is not an AWS feature. It is used to prevent the resource from being removed if accidentally deleted from theconvox.yml
file. IfdeletionProtection
is enabled, the resource will not be deleted even if it is removed from the manifest.
$ convox resources -a myapp
NAME TYPE URL
cache elasticache-redis redis://hostname:port
$ convox resources info cache -a myapp
Name cache
Type elasticache-redis
URL redis://hostname:port
$ convox resources url cache -a myapp
redis://hostname:port
$ convox resources proxy cache -a myapp
Proxying localhost:6379 to hostname:port
Proxying allows you to connect tools on your local machine to Resources running inside the Rack.