Skip to content

serverless image processing pipeline using Terraform, AWS lambda and s3

Notifications You must be signed in to change notification settings

Derrc/serverless-image-processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Image Processing

serverless image processing pipeline using AWS s3 and lambda, infrastructure created using Terraform

Architecture diagram

Supported Operations (Query Parameters)

  • saveDirectory: directory path to save image to (Ex: food/images), defaults to root directory if not present
  • resizeX: width to resize image to
  • resizeY: height to resize image to

Pipeline

  • post to lambda function url endpoint with image as multi-part form data and processing parameters as query parameters
  • image will be processed and uploaded to s3 bucket
  • response will be returned with s3 url to retrieve image

Usage

If anyone wants to use this for themselves, make sure to change the following in main.tf file:

  • s3 bucket names (bucket for terraform state and for uploaded images)
  • aws region
  • lambda function url CORS

To compile the lambda function into a zip file and create/update infrastructure use the deploy script:

cd terraform && ./deploy.sh

About

serverless image processing pipeline using Terraform, AWS lambda and s3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published