Upgrading a Redis version or changing the instance type
If you have a Redis cluster in the Cloud Platform, you must keep it up to date and use the most cost effective instance type for your needs.
AWS publishes an ElastiCache for Redis end-of-life schedule and supported Redis versions guide to help you keep up to date.
Upgrading a Redis version
Note: This will cause some downtime (usually minutes, dependent on how much data is in your cluster).
To upgrade your Redis cluster version, complete these three steps:
Raise and merge a PR to tell the apply pipeline to skip your namespace
Raise and merge a PR that updates the following attributes for your ElastiCache for Redis cluster, which is typically in
resources/elasticache.tf
in your namespace:module "redis_cluster" { ... engine_version = "7.0" parameter_group_name = "default.redis7" ... }
These two attributes must match the version you are upgrading to. The table below shows the attribute pairs to use.
As soon as this PR is merged, the upgrade will begin.
Engine version and parameter groups
Version to upgrade to engine_version parameter_group_name Redis 7.0 7.0
default.redis7
Raise and merge a PR to remove the
APPLY_PIPELINE_SKIP_THIS_NAMESPACE
file added in step 1
Upgrade paths
Redis aims to maintain backwards compatibility when releasing a new major version. This means that you can upgrade your Redis cluster through multiple major versions in one upgrade step.
For example, you can upgrade from ElastiCache for Redis 4.0.10
directly to ElastiCache for Redis 7.0
.
Current Redis version | You should upgrade to |
---|---|
4.0.x | 7.0 |
5.0.x | 7.0 |
6.0.x | 7.0 |
6.2.x | 7.0 |
Changing your Redis instance type
Note: This will cause some downtime (usually minutes, dependent on how much data is in your cluster).
To change your Redis instance type, complete these three steps:
Raise and merge a PR to tell the apply pipeline to skip your namespace
Raise and merge a PR that updates the
node_type
attribute for your ElastiCache for Redis cluster, which is typically inresources/elasticache.tf
in your namespace:module "redis_cluster" { ... node_type = "cache.t4g.micro" ... }
The Creating a Redis cluster guide can help you decide which
node_type
to use.As soon as this PR is merged, the instance type change will begin.
Raise and merge a PR to remove the
APPLY_PIPELINE_SKIP_THIS_NAMESPACE
file added in step 1