One way to do it is to use presigned urls and the user uploads to s3 directly.. only using elixir to generate the presigned url.
Then you can point cloudfront to s3.
Then you can request the file directly from cloudfront.. passing the cloudfront url to GitHub - imgproxy/imgproxy: Fast and secure standalone server for resizing, processing, and converting images on the fly · GitHub running on ecs/fargate.
The advantage is there’s not too much code you have to write and images are available as soon as the user has uploaded. If imgproxy or another app like it (there’s a couple) has the transformations you need, it might be worth exploring.






















