How hossain8078/serverless-image-processing-pipeline works
This application turns an image in the originals bucket into a thumbnail in the resized bucket. Users can start processing by uploading an image, which triggers EventBridge, or by calling the API; both routes start the Step Functions workflow, which invokes the Lambda handler. The handler validates and reads the image, uses Pillow to resize it, then writes the thumbnail. The workflow records success or failure, and CloudWatch receives logs. Infrastructure relationships and workflow details are documented in the README; source excerpts show the handler’s processing steps.
Main entry points: app.py Resize Lambda · image_processing.asl.json Resize Task · template.yaml Originals Bucket
Components 15
Entry Triggers
- API Gateway
template.yaml - EventBridge Rule
template.yaml
Workflow Orchestration
- Step Functions
statemachine/image_processing.asl.json - Resize Task
statemachine/image_processing.asl.json - Unexpected Error
statemachine/image_processing.asl.json - Result Choice
statemachine/image_processing.asl.json - Success State
statemachine/image_processing.asl.json - Failure State
statemachine/image_processing.asl.json
Image Processing
- Resize Lambda
src/resize_image/app.py - Pillow Resize
src/resize_image/app.py
Storage and Monitoring
- Originals Bucket
template.yaml - Resized Bucket
template.yaml - CloudWatch Logs
template.yaml
Other components
- API Client
- Image Uploader
Connections 17
- API Client → API Gateway: POST request
README.md - Image Uploader → Originals Bucket: uploads image
README.md - Originals Bucket → EventBridge Rule: object created
README.md - API Gateway → Step Functions: starts execution
README.md - EventBridge Rule → Step Functions: starts execution
README.md - Step Functions → Resize Task: runs task
README.md - Resize Task → Resize Lambda: invokes
README.md - Resize Lambda → Originals Bucket: reads image
src/resize_image/app.py - Resize Lambda → Pillow Resize: resizes image
src/resize_image/app.py - Resize Lambda → Resized Bucket: writes thumbnail
src/resize_image/app.py - Resize Task → Unexpected Error: handles errors
README.md - Resize Task → Result Choice: returns result
README.md - Unexpected Error → Result Choice: records failure
README.md - Result Choice → Success State: on success
README.md - Result Choice → Failure State: otherwise fails
README.md - Resize Lambda → CloudWatch Logs: writes logs
README.md - Step Functions → CloudWatch Logs: logs executions
README.md