Skip to content

Elasticache migration from one cluster to another

1

Hello,

I have a an Elasticache cluster on Redis engine of version 7.0.1. On it "Encryption in transit" is disabled. My goal is to setup the password connection for my redis cluster.

For that I created new Elasticache cluster with option "Encryption in transit" enabled.

Now my goal is to migrate data from my source redis cluster to target.

1.Restore from backup is not an option for us, since we do not want downtime during this operation.

  1. Option "Migrate data from endpoint", described here is not for moving data between ElastiCache clusters. So we can`t use it.

  2. I found some related thread here: https://repost.aws/questions/QUMDfX6vnHTTiXaYKOzTK0mA/elasticache-migration-from-one-account-to-another But it mentioned that command SLAV*OF is not supported in Elasticache.

So my question is: How to perform data migration from source cluster (with "Encryption in transit" disabled ) to target cluster (with "Encryption in transit" enabled.), without downtime?

P.S. I saw some threads, like this one where suggested to use third-party tool like RedisShake. But I am wondering of it`s only one option to use third-party tools or maybe there some ElastiCache built-in mechanism to achieve it?

asked 2 years ago681 views

1 Answer
0

To migrate data from your source ElastiCache cluster (with "Encryption in transit" disabled) to a target cluster (with "Encryption in transit" enabled) without downtime, you'll need to use a different approach than the ones you've mentioned. Unfortunately, ElastiCache doesn't provide a built-in mechanism for direct cluster-to-cluster migration in this scenario.

Here's an alternative approach you can consider:

  1. Set up a temporary EC2 instance that can access both the source and target ElastiCache clusters.

  2. Use this EC2 instance as an intermediary to replicate data from the source to the target cluster.

  3. On the EC2 instance, you can use Redis replication commands to set up the replication:

    • Connect to the source cluster as a read replica.
    • Simultaneously, connect to the target cluster and forward the data.
  4. Monitor the replication process to ensure data is being copied correctly.

  5. Once the initial data copy is complete and replication is caught up, you can switch your application to use the new target cluster.

  6. After verifying that the new cluster is working correctly, decommission the old cluster and the temporary EC2 instance.

This approach allows for a near-real-time replication without significant downtime. However, it does require careful setup and monitoring to ensure data integrity during the migration process.

It's important to note that this method, while possible, is not officially supported by AWS and may require additional configuration and scripting. If you're not comfortable with this approach or lack the necessary Redis expertise, using a third-party tool like RedisShake might indeed be a more straightforward option.

For complex migrations or if you require official AWS support, you may want to consider engaging AWS Professional Services or a certified AWS partner who can provide tailored solutions for your specific use case.

Sources
Elasticache migration from one account to another | AWS re:Post

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.