How to Transfer Large Files to Amazon S3

Amazon S3 is a cheaper and more reliable data storage than your normal web hosting server.

Moving files to Amazon S3 from any server is pretty easy using command line interfaces. I will show you how to move files from any Linux server including EC2 instances to Amazon S3 using s3cmd.

S3cmd is an easy to use command line interface for managing Amazon s3. The best part is that S3cmd is free.

Step 1: Create your amazon crendentials

If you already have your amazon credentials created and stored somewhere you can easily reference it then you an skip this step. If not, select your name on amazon top navigation bar and select security credentials. Remember to download the credential and store for future references.

Step 2: Install S3cmd on your Linux server or EC2 instance

for Ubuntu/Debian users

sudo apt-get install s3cmd

for centOs users

yum install s3cmd

Step 3: Configure your s3cmd

s3cmd --configure

this command will prompt you for your amazon security credentials which you created in step 1. Asides the credential, other details during configuration are not mandatory.

Once done you can easily move your files or folder to any bucket on your Amazon s3.

To move your folders do:

s3cmd put -r <source_folder_path> s3://bucket_name/folder_name/

To move a file do:

s3cmd put <source_file_path> s3://bucket_name/