Creating presigned url for a S3 folder in python


I’m trying to generate a presigned url to a S3 folder (which itself contains more folders/files) and distribute it between my clients so they can download its content. i.e. by clicking the link, the users will download the folder to their local disk.

However, I keep getting a “no such key” error in an XML dialogue.

I’m using client.generate_presigned_url() from boto3 sdk

this is the error message:


S3 has no concept of “folders”. What you are effectively trying to do here is create a presigned url for multiple keys which is also not possible. If you absolutely have to share single url for multiple files, you’ll need zip them into a single object and then share key of that object using presigned url.

Leave a Reply