mercredi 25 février 2015

Downloading File From Amazon S3 As AWS User When File is Set to Non-Public Read

I have a file that is stored at a URL that looks like:



http://ift.tt/1Fu0vVR


The file is currently set to public-read as its ACL. This is done using the AWS SDK (PHP version in my case) with:



$s3client->uploadDirectory("/myDirectory/user-one", "my-bucket", "user-one",
array("params" => array("ACL" => "public-read", "ContentDisposition" => "attachment")));


Anyone with the URL can download my file right now. I would like only a group of servers I control to have access to the file.


From what I've read, I would need to assign an ACL permission using the putObjectAcl method. Once I do this, how would I authenitcate with S3 to download the file from the URL?


I am currently initiating a GET request on the URL to download the file, but since authentication would now be required, would I have to download the file through a S3 SDK method?





Aucun commentaire:

Enregistrer un commentaire