I want to upgrade my Amazon ElastiCache for Redis engine version.
Resolution
Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.
Prepare for the upgrade
Schedule your upgrade
When the engine upgrade process starts, ElastiCache takes the following actions:
- Launches a new set of nodes for each previously existing node with the new engine version
- Copies all the data from the current primary node to the new primary node
- Syncs the new read replicas with the new primary node
- Updates the DNS entries to point to the new nodes
- Deletes the old nodes
The time it takes for the engine upgrade to complete can vary based on the following factors:
- Amount or kind of data in the cluster
- Network connectivity
- Incoming traffic or load rates
During the upgrade process, the cluster is available for all reads and most writes. It's a best practice to schedule the engine upgrade during periods of low incoming write traffic.
For Redis engine versions 5.0.5 and later, the upgrade requires minimal downtime. During the upgrade, the cluster is available for reads. The cluster is also available for writes for most of the upgrade, except during the failover operation that lasts only a few seconds.
For Redis engine versions earlier than 5.0.5, you can experience a longer failover time during the DNS propagation. The failover time can last from 30 seconds to a minute.
Create a backup of your cluster
Because the engine upgrade replicates data to the new node, make sure to back up your data. If your clusters have high write traffic or there's not enough reserved memory for the backup, then your backup might fail and you lose data.
To prevent unplanned data loss, it's a best practice to back up the Redis cluster before you start the upgrade. If you lose data during the upgrade, then create a new cluster from the backup.
Note: ElastiCache is a managed service that automatically updates DNS entries to point to the new nodes.
Upgrade your engine version
To upgrade your Redis engine version, complete the following steps:
- Manually back up your Redis cluster or replication group.
- Modify the ElastiCache cluster or the replication group, and then choose a new engine version.
For more information, see Upgrade considerations when working with self-designed clusters.