A simple clone of haveibeenpwned written in Go, and implemented using the AWS stack and the Serverless Framework:
- Serverless framework
- Cloudformation
- Lambda
- DynamoDB
- Simple Queue Service
You'll need an AWS account before proceeding with the remaining steps.
Install the Serverless Framework
$ npm install -g serverless
Configure your AWS credentials
https://www.serverless.com/framework/docs/providers/aws/cli-reference/config-credentials/
Deploy haveibeenbreached
$ make deploy
Creates a new breach.
$ sls invoke -f createBreach -l --path exampleEvents/createBreach.json
Adds a list of email accounts to an existing breach.
$ sls invoke -f addAccountsToBreach -l --path exampleEvents/addAccountsToBreach.json
Retrieves an existing email account that has been involved in any breaches.
$ sls invoke -f findAccount -l --path exampleEvents/findAccount.json
Subscribes an email for breach notifications. It sends a subscription message to SQS.
$ sls invoke -f notifyMe -l --path exampleEvents/notifyMe.json
Processes subscription messages on SQS, and sends subscription confirmation emails (not implemented) to subscribers.
Send emails to subscribers whose emails are involved in a given breach.
$ sls invoke -f notifySubscribersOfBreach -l --path exampleEvents/notifySubscribersOfBreach.json