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-in
Enter the new directory
$ cd double-opt-in
Install the Node.js packages
$ npm install
Deploy your project
$ serverless deploy
To 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.json
Deploy 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\": \"[email protected]\" }" https://qlf1mk0k85.execute-api.eu-central-1.amazonaws.com/initiateDoubleOptIn