This repo will contain lambda's to send out notifications (emails for now) to finvoice users.
- event_notification --> triggered for every message sent to the SNS topic (staging_platform_events in staging and production_platform_events in production)
- Install serverless
- Install python 3.6
- Validate following commands returns 3.6
python --version
- If not add following alias (add it to bash profile so its applied every time)
alias python=python3.6
python -m unittest src/tests/email_helper_tests.py
- Run following command to check the version
python --version - If above does not return 3.6 then run the following command
alias python=python3.6 - Check version again - you may want to add above alias command to ~/.bash_profile if you do not want to set it manually everytime
- Install boto3 library
pip3 install boto3 - Run the lambda locally
sls invoke local --function event_notification --stage local
serverless deploy -v --stage dev
serverless invoke -f analytics_email_trigger --stage dev
serverless deploy -v --stage prod