What is the default way to upload files from a EC2 web server to a S3 bucket for content delivery?
How to upload files from Amazon EC2 server to S3 bucket
amazon ec2amazon s3cdn
Related Topic
- Cannot upload files bigger than 8GB to Amazon S3 by multi-part upload due to broken pipe
- Upload Files to Amazon AWS
- Causing Access Denied when using the aws cli to download from Amazon S3
- Anonymous access to S3 bucket only from the EC2 instances
- How to let user upload files to S3 bucket, but not overwrite or delete
- How does Amazon ec2-user get its sudo rights
- Is it possible to upload files directly to Amazon S3 and edit them
Best Answer
The answer is rather dependent on the purpose. For instance, if your EC2 instance is running a PHP application, then using the PHP-SDK would be the best route. Some applications might find it useful to mount an S3 bucket as a local file-system (e.g. S3-fuse).
If however, you are simply trying to upload a file via the shell from EC2 to S3, I would recommend Tim Kay's aws script. It is a self-contained perl script that can run without installation, or can be installed to setup alias functions. Uploading a file to an existing bucket using this script amounts to the following:
It supports most of the features of AWS and is sufficiently verbose in its error messages to make debugging a problem fairly easy.