Skip to content

Conversation

@dlzhry2nhs
Copy link
Collaborator

@dlzhry2nhs dlzhry2nhs commented Jan 7, 2026

Summary

  • Routine Change

Minor improvement to how we handle errors in the Delta Lambda and hopefully improves the readability too.

Key changes:

  • removed SNS Topic that was setup for Lambda failures. This was not being used (no one was subscribed to it) and it was inconsistent with the behaviour within the function which was to deliver the full Kinesis event to SQS where failures would be securely stored.
  • refactored so instead of sending the full Kinesis event, even when some records succeeded and some failed, we just send the ones which failed (i.e. critical DB error, data was not persisted etc.) to SQS so they can be investigated and retried.
  • removed the try - catch wrapper. As the process_records method is fully wrapped (intentionally, it seems) the only thing it was catching was a malformed event, which can only really happen if you're messing around or AWS release something catastrophic. In such cases just let it fail -> get the full error -> also forwarded to SQS. We will get a notification from the alarm anyway.

Reviews Required

  • Dev

Review Checklist

ℹ️ This section is to be filled in by the reviewer.

  • I have reviewed the changes in this PR and they fill all of the acceptance criteria of the ticket.
  • If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
  • If there were changes that are outside of the regular release processes e.g. account infrastructure to setup, manual setup for external API integrations, secrets to set, then I have checked that the developer has flagged this to the Tech Lead as release steps.
  • I have checked that no Personal Identifiable Data (PID) is logged as part of the changes.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

This branch is working on a ticket in the NHS England VED JIRA Project. Here's a handy link to the ticket:

VED-1006

@dlzhry2nhs dlzhry2nhs marked this pull request as ready for review January 8, 2026 10:04
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 8, 2026

@dlzhry2nhs dlzhry2nhs temporarily deployed to internal-dev-sandbox January 8, 2026 11:13 — with GitHub Actions Inactive
@dlzhry2nhs dlzhry2nhs merged commit 78dbbce into master Jan 8, 2026
17 checks passed
@dlzhry2nhs dlzhry2nhs deleted the feature/VED-1006-improve-delta-failure-handling branch January 8, 2026 11:16
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.

4 participants