image upload / download with resizing. Used API gateway's binary support & serverless
Lambda Image Manager is AWS Lambda function that store, get, manipulate images in AWS S3.
If you are using Cloudinary or Imgix like service just for resizing or basic image manipulation, maybe you don't need them anymore.
If you aren't used to Serverless or AWS Lambda, I highly recommend that read Serverless docs first.
Remember! AWS provides free tier amount, but this whole service is not FREE.
git clone https://github.com/TylorShin/lambda-image-manager.git cd lambda-image-manager npm install
And set production environment. (If you want to stage or other)
# /env/prod.yml S3_BUCKET_NAME: lambdaImage S3_DEST_PREFIX: images/original
The S3 folder structure should be like below.
# lambdaImage Bucket /root /images /original
Then if you ready to deploy Serverless project, just run
npm run deploy:prod
(this image is actually from my own service by using this repository)
You should set lambda-image-manager's API Gateway's binary support option.
At API Gateway setting page, set binary option allow header to "image/*". Then, Deploy API Gateway once again in console dashboard.