Tutorial
ElastiCache to Azure Managed Redis (AMR)
February 27, 20265 minute read
Migrate from AWS ElastiCache to Azure Managed Redis (AMR) using an offline S3 export-and-import workflow. Export your ElastiCache data as an RDB file, transfer it through an S3 bucket to Azure Blob storage, and import it into a new AMR instance.
#What you'll learn
- How to create an S3 bucket with the correct permissions for ElastiCache backups
- How to export an RDB backup from ElastiCache to S3
- How to upload the RDB file to Azure Blob storage
- How to create and size an Azure Managed Redis instance
- How to import the RDB data into Azure Managed Redis
#Prerequisites
- An AWS account with an existing ElastiCache instance
- An Azure subscription with permissions to create storage accounts and Azure Managed Redis instances
- Familiarity with the AWS and Azure consoles
Before migrating to Azure Managed Redis, evaluate your migration options and choose the best strategy. Read this guide to determine which migration strategy is right for you. If you're considering Redis Cloud instead, see the ElastiCache to Redis Cloud migration guide. Reach out to our team for support on live migrations.
#How do you perform an offline data migration from ElastiCache to Azure Managed Redis?
The offline migration process involves exporting your ElastiCache data as an RDB file to Amazon S3, transferring that file to Azure Blob storage, and importing it into your new Azure Managed Redis instance.
#How do you create an S3 bucket with the right permissions for ElastiCache backups?
Open Amazon S3 and create a new bucket. The ElastiCache backup and the Amazon S3 bucket that you create must be in the same AWS Region.

Navigate to your new S3 bucket and go to the Permissions tab.

- Under Access Control List (ACL), choose Edit. Select Add grantee.
- ElastiCache canonical ID (paste this in under Grantee): 540804c33a284a299d2547575ce1010f2312ef3da9b3a053c8bc45bf233e4353
- Select Objects > List & Write
- Select Bucket ACL > Read & Write

Under the Permissions tab still, add the following JSON to the Bucket Policy section. Replace UNIQUE-BUCKET-NAME with the name of your S3 bucket:

#How do you create and export a backup from ElastiCache?
- Navigate back to your ElastiCache instance.
- Select the Actions button, and create a Backup.

#How do you export the ElastiCache backup to an S3 bucket?
- Navigate to the Backup page within ElastiCache and select the Backup you created.
- Within the Backup, select Export.

Select the Target S3 location as the S3 bucket you created earlier.

Return to the S3 bucket and download the .rdb file that was created.

#How do you upload the RDB file to Azure Blob storage?
- In the Microsoft Azure console, navigate to Storage Accounts.
- Create an Azure Blob instance.

Upload your .rdb file into the Blob container.

#How do you create and size an Azure Managed Redis instance?
- Navigate to Azure Managed Redis.
- Select a size that fits your data set size captured from your ElastiCache instance. The rough estimate for sizing is your [current data set size * 1.2] = AMR data size (round up to the nearest size).

Select the data modules that you used within your ElastiCache instance (RediSearch, RedisJSON, RedisTimeSeries, RedisBloom).

Create your instance.
#How do you import the RDB file into Azure Managed Redis?
- Navigate to your instance once it's been created.
- Go to Administration > Import Data.

NOTE: Importing will delete existing cache data.
- Choose your storage account which has the .rdb blob.
- Select the .rdb file you wish to import.

Import your data.
#How do you validate the migration and update your application?
After the import completes, verify the data in your new Azure Managed Redis instance:
- Connect to the AMR instance using
redis-clior your preferred Redis client. - Run
DBSIZEto confirm the key count matches your source ElastiCache instance. - Spot-check a few keys with
GET,HGETALL, or other commands relevant to your data structures. - Update your application's Redis connection strings to point to the new Azure Managed Redis endpoint.