Skip to content

Conversation

@cookel2
Copy link
Contributor

@cookel2 cookel2 commented Feb 12, 2026

What

Jira ticket: https://officefornationalstatistics.atlassian.net/jira/software/c/projects/DIS/boards/1824?selectedIssue=DIS-4424

The task was originally to make it possible to connect using IAM. However, after much investigation and testing, it was discovered that it's not possible to connect using IAM if the DocumentDB version is below v5. And currently we use v4.

Therefore this PR uses the existing username and password (e.g. for the migrations database) to connect from EKS (e.g from the migration service). But changes have been made to the connection string (see details added to the readme) and an AWS CA file is also used now. These changes were necessary in order to connect successfully from EKS.

Finally, for backwards compatibility, the new way of connecting requires an environment variable named CONNECT_EKS to be set to true. By default it's set to false, which means that the current (legacy) way of connecting will be used.

How to review

This can be tested locally using the following branch of the dis-test-eks-app:

https://github.com/ONSdigital/dis-test-eks-app/tree/feature/test-mongodb-connection

But it would probably be easiest if I give you a demo, which I'm happy to do.

Who can review

Anyone.

@cookel2 cookel2 requested review from a team as code owners February 12, 2026 19:40
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.

1 participant