
How to create download link for an Amazon S3 bucket's object?
I see that people have already responded to this but I wanted to add some more context for those who may have a secured bucket (requires access). Note, you don't have to generate the URLs if you talk directly to the S3 bucket, then you can use 'file_get_contents' etc. but it is much slower as you can't use multi curl requests (for speed). However you could use pthreads if you have a newer php release.
INSTALLATION: Install the S3 Class file for Amazon, there are easy ways to add it using composer or just downloading the S3.php file manually.
NOT SECURED: (see other posts on this matter, just basically use the URL)
SECURED HTTPS (when you have your bucket protected):
(1) Create a https:// url and use the multi curl tool to get them all at the same time (recommended).
A simplistic example:
more info:
http://docs.aws.amazon.com/aws-sdk-php/v2/api/class-Aws.S3.S3Client.html#_getObjectUrlhttp://undesigned.org.za/2007/10/22/amazon-s3-php-class/documentation
FYI:
0 thoughts to “Aws s3 link for file download”