3 Answers
Your app would dynamically create the URLs for your users and set the expiration time. They user could refresh or navigated back to the page to get freshly generated URLs.
https://docs.aws.amazon.com/aws-sdk-php/v3/guide/service/s3-presigned-url.html
Sid is correct.
You might want to play around with the AWS CLI command aws s3 presign command (see https://docs.aws.amazon.com/cli/latest/reference/s3/presign.html).
The output from this command is a URL which can be used to download a file from S3 for a specific period of time. Use the equivalent API call in a Java JSP, PHP to produce HTML something like:
<a href=“https://s3.amazonaws.com/static.amazonian.io/t.t
A practical example of where I used this was designing an enterprise bill presentment and payment (EBPP) site. Think of viewing and paying your utility payment online. The application lists amounts due, but at the time it builds the page for the customer, it hits AWS S3 and generates presigned URLs for the customer to download bills. In this way I can store somewhat confidential data in S3, permit an authenticated (to my application) user to access, and keep away trolls.
If you want to see more info in about this architecture, I described it in this presentation:
https://s3.amazonaws.com/ebpp-static.gpsbiker.com/EBPP%2BGovo.pdf
and a working demo is here:
http://ebpp-static.gpsbiker.com/ebpp2.html
(note: if you’re viewing this after I’ve taken down the live link, reply here and if i get pinged i’ll turn it back on)