DEV Community

Lakh Bawa
Lakh Bawa

Posted on

How to transfer data from your Existing Server to Aws S3

Amazon S3 is a pretty good and inexpensive choice for website data storage. You can save a lot of money uploading website data such as user uploads to S3 instead of your hosting server.

I found it a little difficult to understand how s3 migration works and did not find any simple tutorial on that. So here I am sharing the steps that can help you to migrate data to the S3 bucket.


  1. Install Aws Cli on your existing Server
curl "" -o ""
sudo ./aws/install
Enter fullscreen mode Exit fullscreen mode


  1. Go to the IAM section in your AWS console and create a user will full administration access. Note down the Access Key Id and Access key secret provided to you after creating the user account.

  2. Configure the Aws Cli on your Server using

aws configure
Enter fullscreen mode Exit fullscreen mode

command, and provide Access Key Id and secret that you created before.

  1. run aws s3 list to see the list of s3 buckets created inside your account( create one if you haven't done so).

  2. Run the following command to copy the files to s3 bucket

aws s3 cp directory-to-be-uploaded s3://bucket-name-here --recursive
Enter fullscreen mode Exit fullscreen mode

Thanks for reading.

Top comments (1)

quangpl profile image
Quang Phan

Your post is well btw we can use for other storage services