Digital Endeavours hardened the infrastructure behind The National Archives’ Find Case Law enrichment service. The service marks up judgments with references to other cases and legislation. Working through a consultancy during the Alpha phase, Digital Endeavours made its deployments safer and prepared its infrastructure for handover to The National Archives.
Digital Endeavours worked on the service part time, alongside another engagement, and contributed more than 130 changes to its public codebase over four months. The data scientists owned the application logic, and Digital Endeavours owned the AWS architecture and the infrastructure automation that deployed their work.
As the Alpha phase approached handover, the consultancy asked Digital Endeavours to review the infrastructure for flaws and improvements. Digital Endeavours identified the work needed before The National Archives could run the service, covering validated deployments with controlled promotion between environments, standardised environment configuration so the automation behaved reliably, and network security suited to long term operation. Digital Endeavours made the case that doing this properly needed dedicated time, and the consultancy allocated it. Recommendations that would not fit the time frame, and that an Alpha phase did not need, went into a MoSCoW matrix so stakeholders could prioritise them for later phases.
Digital Endeavours redesigned the CI/CD workflows so nothing reached production without passing staging first. Pull requests were checked with Terraform linting, Python formatting checks and Python tests before merge. Staging and production ran as separate pipelines with consistent environment names, and production only deployed once staging had succeeded. Digital Endeavours automated the build and deployment of the Lambda functions’ Docker images, and added a pre-commit hook that checks for AWS credentials and private keys before code is committed.
Digital Endeavours moved the database from public to private subnets, enabled deletion protection across every environment, set a strong IAM password policy and recommended multiple NAT Gateways in production for resilience. A scheduled Lambda, added by Digital Endeavours, took database snapshots so the data could be recovered. Digital Endeavours also built the cross account storage, bucket policies and KMS key access that let the service exchange judgments securely with a third party.
To support handover, Digital Endeavours produced AWS architecture diagrams in Lucidchart and added them to the repository’s documentation. They showed services spanning three AWS accounts and components delivered by different teams, with a separate diagram for the third party integration.
Results
Errors in production fell by 100%, because every release had to pass staging validation first and no deployment reached production untested. The database sat in private subnets, every environment was protected against accidental deletion, and the architecture was documented for handover. The MoSCoW matrix gave a prioritised list of further improvements, and the consultancy picked up some of its items.
Key Technologies
CI/CD: GitHub Actions
Infrastructure: AWS (Lambda, VPC, RDS, ECR, S3, KMS, EventBridge, IAM), Terraform
Application: Python, Docker
Documentation: Lucidchart