Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upload folder with subfolders using S3 and the AWS console

Tags:

amazon-s3

When I try to upload a folder with subfolders to S3 through the AWS console, only the files are uploaded not the subfolders.

You also can't select a folder. It always requires opening the folder first before you can select anything.

Is this even possible?

like image 523
chrismarx Avatar asked Feb 25 '11 22:02

chrismarx


People also ask

How do I upload files and folders to an S3 bucket?

To upload folders and files to an S3 bucketSign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/ . In the Buckets list, choose the name of the bucket that you want to upload your folders or files to. Choose Upload.

Can you have folders in S3?

You can have folders within folders, but not buckets within buckets. You can upload and copy objects directly into a folder.

Does S3 console use multipart upload?

Amazon S3 is excited to announce Multipart Upload which allows faster, more flexible uploads into Amazon S3. Multipart Upload allows you to upload a single object as a set of parts. After all parts of your object are uploaded, Amazon S3 then presents the data as a single object.


1 Answers

I suggest you to use AWS CLI. As it is very easy using command line and awscli

    aws s3 cp SOURCE_DIR s3://DEST_BUCKET/ --recursive 

or you can use sync by

    aws s3 sync SOURCE_DIR s3://DEST_BUCKET/ 

Remember that you have to install aws cli and configure it by using your Access Key ID and Secrect Access Key ID

     pip install --upgrade --user awscli         aws configure 
like image 93
Asad Avatar answered Sep 21 '22 15:09

Asad