A fully serverless, event-driven application built using AWS that automatically processes uploaded files, extracts metadata, stores details in DynamoDB, and sends real-time notifications via SNS.
This project demonstrates how to build a scalable serverless architecture using AWS Lambda, S3, DynamoDB, and SNS — a common workflow used in cloud automation, enterprise data ingestion, and serverless backends.
Whenever a file is uploaded to an S3 bucket, a Lambda function is triggered that:
- Extracts file metadata (name, size, timestamp)
- Stores the metadata in DynamoDB
- Publishes a notification via Amazon SNS to alert about the new file upload
| Service | Purpose |
|---|---|
| Amazon S3 | Stores uploaded files |
| AWS Lambda | Processes S3 upload events |
| Amazon DynamoDB | Stores file metadata |
| Amazon SNS | Sends email notifications |
| Amazon CloudWatch | Monitors logs and metrics |
-
Go to Amazon S3 Console
-
Create a bucket (e.g.,
serverless-file-processing-project) -
Under Properties → Event Notifications, create a new event:
- Event type:
all object create event - Destination: Lambda function (created later)
- Event type:
- Table name:
FileUploads - Primary key:
file_name(String)
- Topic name:
FileUploadNotifications - Subscribe your email (check inbox to confirm)
- Copy the Topic ARN (you’ll use it in Lambda)
-
Function name:
FileProcessorLambda -
Runtime:
Python 3.9or later -
Add environment variables:
DYNAMODB_TABLE = FileUploads SNS_TOPIC_ARN = arn:aws:sns:REGION:ACCOUNT_ID:FileUploadNotifications -
Attach an IAM Role with permissions for:
s3:GetObjectdynamodb:PutItemsns:Publish
- Upload a file to your S3 bucket (any image, PDF, or text file).
- Check DynamoDB → FileUploads → you should see a new record.
- Check your email inbox → you’ll receive a notification.
- Check CloudWatch Logs if something fails.
{
"file_name": "invoice.pdf",
"bucket": "serverless-file-processing-project",
"file_size": 45213,
"upload_time": "2025-10-17T12:45:00Z"
}| Feature | Description |
|---|---|
| CloudFront + S3 Web UI | Create a simple frontend to upload files |
| API Gateway | Add REST API for querying uploaded files |
| SES instead of SNS | Send rich HTML emails |
| Cost Monitoring | Add CloudWatch metrics for uploads per day |
When finished:
- Delete S3 bucket (after removing files)
- Delete Lambda function
- Delete SNS topic
- Delete DynamoDB table
Arni Johry
