generated from NHSDigital/nhs-notify-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 3
CCM-13295 add basic status reporter component #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or 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
sidnhs
approved these changes
Feb 3, 2026
simonlabarere
approved these changes
Feb 3, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the Digital Letters status reporter component. This component subscribes to all Digital Letters events and uses a Firehose stream (with associated transformer lambda) to record them to S3. There is then an
event_recordGlue table which is backed by these files in S3 and a corresponding Athena workspace which can be used to query the table.Note: While the Glue table is configured to point to the S3 bucket it does not automatically load the data from S3. A follow-up PR will be produced to implement the step function shown in the above diagram to do this. In the meantime, we can manually use the
MSCK REPAIR TABLE event_recordcommand in Athena to prompt data to be reloaded from S3.Context
This component allows us to record details of all events sent as part of the Digital Letters application, so that other components can use Athena to query the Glue table in order to build the reports that will be sent back to the customer.
Validation
Ran the following query in Athena:
Sent a

uk.nhs.notify.digital.letters.mesh.inbox.message.downloaded.v1event to my DE's event bus with a sender ID ofpr-validation-1:Verified that the event had been recorded to S3:

Ran the

MSCK REPAIR TABLE event_recordcommand in Athena:Re-ran the original Athena query:

A CloudWatch query of the event bus logs (filtered for

pr-validation-1), for comparison:Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.