Skip to content

CCM-17343: Add routing of supplier config events to no-op lambda#570

Open
stevebux wants to merge 2 commits into
mainfrom
feature/CCM-17343-Route-Supplier-Config
Open

CCM-17343: Add routing of supplier config events to no-op lambda#570
stevebux wants to merge 2 commits into
mainfrom
feature/CCM-17343-Route-Supplier-Config

Conversation

@stevebux
Copy link
Copy Markdown
Contributor

@stevebux stevebux commented May 7, 2026

Description

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

DT3-Specific Checklist

  • If I have added a new resource (SQS, Lambda, Gateway, DDB table, etc), I have created the appropriate alarms

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.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@stevebux stevebux requested review from a team as code owners May 7, 2026 15:01
@stevebux stevebux force-pushed the feature/CCM-17343-Route-Supplier-Config branch from 86fd099 to 779f02a Compare May 14, 2026 13:36
@stevebux stevebux requested a review from Copilot May 14, 2026 13:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_config queue (with SNS-only send policy), SNS subscription with a MessageBody prefix filter on type, supplier_config_ingress Lambda module, and an SQS→Lambda event source mapping with ReportBatchItemFailures.
  • New lambdas/supplier-config-ingress Node package containing a stub supplierConfigHandler that returns { batchItemFailures: [] }, plus jest/tsconfig/build configuration and a unit test.
  • Updates package-lock.json and 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.

Comment thread infrastructure/terraform/components/api/module_lambda_supplier_config_ingress.tf Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants