CCM-17343: Add routing of supplier config events to no-op lambda#570
Open
stevebux wants to merge 2 commits into
Open
CCM-17343: Add routing of supplier config events to no-op lambda#570stevebux wants to merge 2 commits into
stevebux wants to merge 2 commits into
Conversation
86fd099 to
779f02a
Compare
There was a problem hiding this comment.
Pull request overview
Adds the scaffolding to route uk.nhs.notify.supplier-config* events from the eventsub SNS topic into a new SQS queue and on to a placeholder (no-op) Lambda handler, ahead of the real persistence logic being implemented under CCM-17379.
Changes:
- New Terraform:
sqs_supplier_configqueue (with SNS-only send policy), SNS subscription with aMessageBodyprefix filter ontype,supplier_config_ingressLambda module, and an SQS→Lambda event source mapping withReportBatchItemFailures. - New
lambdas/supplier-config-ingressNode package containing a stubsupplierConfigHandlerthat returns{ batchItemFailures: [] }, plus jest/tsconfig/build configuration and a unit test. - Updates
package-lock.jsonand the auto-generated Terraform README to register the new workspace and modules.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| infrastructure/terraform/components/api/module_lambda_supplier_config_ingress.tf | New Lambda module + IAM policy (KMS, SQS receive) for the ingress handler. |
| infrastructure/terraform/components/api/module_sqs_supplier_config.tf | New SQS queue + policy allowing the eventsub SNS topic to publish. |
| infrastructure/terraform/components/api/sns_topic_subscription_eventsub_sqs_supplier_config.tf | Subscribes the queue to eventsub with a type prefix filter. |
| infrastructure/terraform/components/api/lambda_event_source_mapping_supplier_config_ingress.tf | Wires the SQS queue to the Lambda with batched, partial-failure responses. |
| infrastructure/terraform/components/api/README.md | Auto-generated module listing updates. |
| lambdas/supplier-config-ingress/src/index.ts | Placeholder SQS handler returning no failures. |
| lambdas/supplier-config-ingress/src/tests/index.test.ts | Unit test for the placeholder handler. |
| lambdas/supplier-config-ingress/package.json | Package manifest with build/test/lint scripts. |
| lambdas/supplier-config-ingress/jest.config.ts | Jest config (ts-jest ESM, 100% coverage thresholds). |
| lambdas/supplier-config-ingress/tsconfig.json | TS config extending the base, including jest+node types. |
| lambdas/supplier-config-ingress/.gitignore | Ignores build/coverage/node_modules artefacts. |
| package-lock.json | Registers the new workspace. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
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
Context
Type of changes
Checklist
DT3-Specific 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.