Resize existing images in s3 bucket/folder

7.6k views Asked by At

I have a thousands of existing images in s3, and I need to resize all images from one folder, and put it in another folder, but still in one bucket. Is there any solution to resize it with or without lambda? And what trigger shoud I use? Thanks in advance

3

There are 3 answers

0
Sergey Kovalev On BEST ANSWER

If this is a one-time job I would use the simplest approach:

  1. Start EC2 instance.
  2. Mount S3 bucket as a filesystem with s3fs or goofys.
  3. Run ImageMagick on all the files with scaling parameters.
2
John Rotenstein On

Rather than resizing the images, you could consider using a "resize-on-the-fly" service such as:

You can construct URLs that automatically resize images to the desired size, without having to resize and store them yourself.

0
Lucas Martins On

I am using Serverless Image Handler from AWS and I'm enjoying it. It's very simple to implement!