This repository contains Serverless lambda which can be host in AWS environment for handling Email, SMS, Push Notifications.
This lambda will automatically trigger based on the SQS messages. This will consume SQS messages and send relevant notification based on the notification type.
Initially clone the project from this repository.
$ https://github.com/nu1ww/notifier-severless.git
Please refer following steps to run the project in local or development environment.
Configure AWS Credentials
Please add following AWS credentials to .bashrc
file or run directly in the terminal instance.
export AWS_ACCESS_KEY_ID="<Your Access Key Id>"
export AWS_SECRET_ACCESS_KEY="<Your Access Key>"
export AWS_DEFAULT_REGION="<Used AWS Region>"
First clone the project form this repository then run following commands.
Install Serverless
$ npm i serverless -g --save
For deploying the code please execute following command.
$ serverless deploy
or you can run this with stage (Ex - prod)
$ serverless deploy --stage production
This application contains following code/folder structure.
.serverless/
– temporary location for storing serverless cache and state filesconnectors/
– contains all the 3rd party communication channels (Ex - Email, SMS) related logicshelpers/
– contains reusable logicsservices/
– contains services which initiate data processinghandler.js
– initializes the app and glues everything togetherpackage.json
– remembers all packages that app depends on and their versionsserverless.yml
– serverless framework's YML based configuration file