A Serverless double opt-in prototype that uses AWS Lambda and Amazon SES to send emails.
Configure your domain name (used for S3 bucket creation)
custom:
domain: <yourdomain.com>To create a new Serverless project.
$ serverless install --url https://github.com/patternbox/serverless-double-opt-in --name double-opt-inEnter the new directory
$ cd double-opt-inInstall the Node.js packages
$ npm installDeploy your project
$ serverless deployTo trigger a function on your AWS account
$ serverless invoke -l -f initiate -p ./test-events/initiate.json
$ serverless invoke -l -f initiate -p ./test-events/confirm.jsonDeploy a single function (optional)
$ serverless deploy function --function initiate
$ serverless deploy function --function confirm
$ serverless deploy function --function revoke$ curl -X POST -H "Content-Type: application/json" -d "{ \"email\": \"twitter@patternbox.com\" }" https://qlf1mk0k85.execute-api.eu-central-1.amazonaws.com/initiateDoubleOptIn