This repository has been archived by the owner on Apr 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/<data-govuk-request-id>.msg | ||
|
||
or if the file doesn't contain a `data-govuk-request-id` | ||
|
||
no-request-id/<uuid>.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. |