diff --git a/projects/email_alert_notifications/README.md b/projects/email_alert_notifications/README.md index 8b13789..6e73b4a 100644 --- a/projects/email_alert_notifications/README.md +++ b/projects/email_alert_notifications/README.md @@ -1 +1,32 @@ +# Email Alert Notifications +This project sets up an S3 bucket and a Lambda that parses files, +extracts `data-govuk-request-id` and renames the file accordingly as +either: + + travel-advice-alerts/.msg + +or if the file doesn't contain a `data-govuk-request-id` + + no-request-id/.msg + +## Manual Steps + +There are some manual steps required for this 'app'. + +* An SES domain with a RuleSet containing an action that writes to the S3 +bucket (`govuk-email-alert-notifications`). An address on this domain will be +subscribed to all of the travel advice country alerts +* An S3 event configured to execute the lambda (`rename_email_files_with_request_id`) +on the `ObjectCreated` `Put` event for the bucket + +Terraform v0.6.14 doesn't support S3 event sources but support is in +`master` and can be added to the project when released. + +## Updating the Lambda + +The lambda source is +[here](resources/rename_email_files_with_request_id.py) +The [zip file](resources/) must be recreated +after any edits to the source as it is the zip file that is deployed to +AWS.