Skip to content

patternbox/serverless-double-opt-in

Repository files navigation

Serverless double opt-in

A Serverless double opt-in prototype that uses AWS Lambda and Amazon SES to send emails.

Requirements

Configuration

Configure your domain name (used for S3 bucket creation)

custom:
  domain: <yourdomain.com>

Installation

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

Usage

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

About

Email double opt-in prototype implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •