ac360
ac360

Reputation: 7835

Amazon S3 Bucket - Files are completely public, but how can I restrict to allow only pre-signed requests?

I am using Amazon S3 to host images for a public REST API and serve them. Currently, my bucket allows anyone to enter in the URL to the image, without any signature included in the params, and the image will be accessible. However, I'd like to require an expiring signature in each image request, so users will have to go through the API to fetch images. How do I do this? Is this a bucket policy?

Upvotes: 1

Views: 161

Answers (1)

Ryan Parman
Ryan Parman

Reputation: 6935

You simply set all of the files to private. If you want to be able to give out pre-signed URLs, you'll need to generate them as you hand them out.

AWS’ official SDKs make this trivial.

Upvotes: 2

Related Questions