How to copy data from S3 to Azure blob using AzCopy?

AzCopy is a command-line utility that you can use to copy blobs or files to or from a storage account. This article helps you copy objects, directories, and buckets from Amazon Web Services (AWS) S3 to Azure Blob Storage by using AzCopy.

You will need below authorizations to get this work done:

1- To authorize with the Azure Storage, use Azure Active Directory (AD) or a Shared Access Signature (SAS) token.

2- To authorize with AWS S3, use an AWS access key and a secret access key.

Then create a new Storage Account in Azure of blob type if you don't have already. Create a new container in that account and go to details page by clicking on this container. You will see an option Shared Access Signature (SAS) Token, click on it and generate a new token for your container. It helps in getting permission to copy data to and from the container.

Now get AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from your AWS account and that should have permission on S3 to access its buckets data. To get this credential, go to IAM users > Click on your user then click "Security Credentials" and there you can generate a new one if you don't have already.

Now download the AzCopy command line utility on your Ubuntu OS and extract it then use commads to copy data from S3 to Azure blobs.
Download AzCopy package on Ubunut:
        wget -O azcopy.tar.gz
        tar -xf azcopy.tar.gz
        azcopy (You will see a Directory with name azcopy)

SET ENV Variables in terminal:
    export AWS_ACCESS_KEY_ID=abcaaaaaaaaaaaaaaaaaaaaaaaaa
    export AWS_SECRET_ACCESS_KEY=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

sudo azcopy/azcopy copy '' '' --recursive=true

To get detailed documentation, go to below article: