Pre-signed URL for multiple files?

I wrote an implementation for generating pre-signed URLs for the aws-s3 bucket. It works great for getting individual files / objects.

How do I do this to create pre-signed URLs for entire directories? Let's assume that there are several folders on my s3 bucket with their own small html5 applications. Each folder has its own set of html, css, js, as well as media files. In this case, I will not generate a pre-signed URL for a single object.

If I give a pre-signed url for one file, for example: index.html for a folder, this file will also have to load the css, js and media files. Files for which we do not have a signed URL.

I'm just not sure how to implement this.

+4
source share
3 answers

No, they will need to provide an API so that you can upload multiple files first. This is an API limitation, not a pre-signing.

See Is it possible to batch download on amazon s3? .

+5
source

No. A pre-signed URL is valid for only one object.

+1
source

: AWS S3 - , aaa/bbb/ccc/ddd/index.html - . "" ( , ).

To create a separate assigned URL for several "files", you need to do some preprocessing. Pull out all the necessary files locally, write them down and put the zip archive on S3, then generate the assigned zip archive URL.

0
source

All Articles