A tool that helps businesses clean their email lists by removing invalid or inactive email addresses, thus improving their email marketing effectiveness. This project mainly to explain the concept of cleaning email lists using AWS Step function.
- Email List Sanitizing App using AWS Step Function
Client: Nextjs 13, TailwindCSS, UI(Shadcn)
Server: Nodejs, AWS Step Functions, AWS SNS, AWS S3, AWS DynamoDB
Note: We mainly use the Serverless Framework to develop and deploy AWS Lambda functions.
- Runtime: Nodejs 16.x
- HTTP API: CORS enabled
- IAM Role Statements: Allow various AWS services
- Serverless Plugins: serverless-offline, serverless-s3-local, serverless-plugin-typescript, serverless-step-functions
- s3EventHandler: Triggers when a new object is created in the S3 bucket.
- httpApiHandler: General HTTP API handler.
- splitInputFiles: Splits input email files.
- processAndValidateChunk: Processes and validates a chunk of emails.
- mergeAllChunks: Merges all processed and validated chunks.
- S3 Bucket: For file storage.
- SNS Topic: For notifications.
- DynamoDB: For database requirements.
- Step Functions: For orchestrating the email list cleaning.
For more detailed understanding, refer to serverless.yml
.
Cleaning large email lists can be resource-intensive and time-consuming, making it difficult to scale.
Traditional solutions often require dedicated hardware or expensive software, leading to high operational costs.
Managing the various steps and operations, such as splitting the email lists, validation, and merging them back, can be complex.
AWS Step Functions helps us create a serverless workflow, so the system can automatically scale to meet the demands of cleaning large email lists.
By utilizing AWS services, the operational costs are variable and can be much lower than running dedicated hardware.
The state machine in AWS Step Functions organizes the workflow in a clear and visual way, thus simplifying complex tasks like list splitting, validation, and merging.
You need an AWS Account to deploy AWS Serverless and Step functions.
Project mainly split into client
and server
side of code.
cd server
npm install
npm run deploy
Once you deploy lambda functions using serverless, you will see the successful deployment as below
cd client
npm install
Create .env.local
use add the following environment
NEXT_PUBLIC_API_URL=
Use the Serverless URL from the above deployment in Client side .env.local