Download multiple images from Amazon S3 in a zip file?

I have a webpage on a web hosting and images are stored on Amazon S3. I want php to be able to upload multiple images from Amazon S3 through my webpage in a zip file.

What are my options and which is better?

What I know, it is impossible to compress files on S3. Can I use Amazon lambda?

The best solution I've come across.

  • A user selects on my website the images that they want to upload.
  • I get the file name from my database on my web host and upload the images from S3 to a temporary directory on my web host.

  • A mail file is created in a temporary directory and a link is sent to the user. After some time, I delete the temporary directory (with the script) on my web host.

But it would be great if it were not for my hosting to create and upload a zip file.

+4
source share
1 answer

AWS S3 is the "basic building block", so it does not support a feature such as stitching multiple objects together.

You came up with a good way to do this, although you can transfer objects to a zip file rather than upload them. EC2 instances can do this very quickly because they have a quick connection to S3.

Lambda does not work for this, since it only starts when an object is placed in an S3 bucket. You do the opposite.

+1
source

All Articles