Migrate Amazon S3 to Azure Blob Storage
This article explains how to copy objects from an Amazon S3 bucket or prefix into an Azure Blob Storage container with FileMigrata. The destination is a container on blob.core.windows.net. Object keys stay the same, so applications can keep reading them.
This is an object-to-object move. Azure Files (SMB shares) uses a different connector.
Limitations
- Only current objects are copied.
- Objects under an S3 object-lock legal hold that blocks GET are not copied.
- Glacier objects that have not been restored are not copied.
- S3 bucket policies are not converted to Azure RBAC. Recreate permissions on the container yourself.
- ADLS Gen2 (hierarchical namespace) receives blobs only. POSIX ACLs are not applied.
- AWS charges egress on every read, and the cost grows with object count. Budget for it before you start. Azure ingress is usually low cost.
- S3 and Azure use different ETag rules. FileMigrata hashes files independently. See R2, Azure Blob, and ETag traps.
- FileMigrata copies by default and leaves the source in place. Empty the S3 bucket yourself when you are ready.
What is migrated
- Current objects and prefixes
- Content-Type, stored on each blob
Prerequisites
- An S3 credential with list and get permission on the source prefix. See Connect Amazon S3.
- A container-level SAS with list, read, and write (
sp=rwl), or a tightly scoped key. See Connect Azure Blob. - A destination tier other than Archive for the first copy. You cannot spot-check blobs in Archive.
Mapping
- Map one S3 bucket or prefix to one Blob container. You can add a virtual directory prefix inside the container.
- Keep object keys unchanged. Applications find objects by key.
- Use the Blob connector. Do not use
file.core.windows.net, which serves Azure Files shares.
Steps
- Connect Amazon S3.
- Connect Azure Blob.
- Start with one mapping. For an estate-wide cutover, contact sales.
- Copy the current objects.
- Spot-check a few keys.
- Point the application at the Blob endpoint. The S3 source still holds every object, so rollback is simple.
Troubleshooting
- AuthorizationFailure on Blob: The SAS is missing list permission or has expired. Create a new container SAS with
sp=rwl. - InvalidAccessKeyId on S3: Azure credentials were entered in the S3 form. Use an AWS IAM credential for S3 and a SAS for Blob.
- BlobAlreadyExists: Existing keys conflict at the destination. See Conflict policy.
- Network dropped: Resume the same job. A new job copies everything again.
- Token expired: This is an
auth:error. Fix the token and resume. Do not start a second job.
If you need an SMB mount, use the Azure Files connector. For Azure-to-Azure copies, AzCopy on a VM inside Azure also works.