Pros and cons of pocessing images in elixir or with aws lambda

Hey there,
Why would one choose to do image manipulation with arc and imagemagick inside the realm of the elixir project if it is possible to do so with aws lambda if the project is deployed on aws already?
What are pros and cons?
I am asking because to me it would be easier now to do it in elixir, since arc gives this easy solution to make transformations, but in the long run, wouldn’t it introduce problems, or put unnecessary load on the project?

It depends on the load. If you’re expecting something in the realm of 100s images a day, doing it in your Elixir process should be fine. It’s simple and gives you the same workflow in dev and production.

If you’re expecting a large or bursty volume, then Lambda is a great way to solve the scalability problem. Note: For something like this, I’d have a simple python script on Lambda, not Elixir since it’s just shelling out to ImageMagick.

Overall, I don’t do any upfront transformations on images any more. Instead, they go up to an S3 bucket and go through a resizing proxy like Imgix or Thumbor. It’s a lifesaver when your designers change… well… everything, that’s what they do!

3 Likes