Skip to content

Publish Oracle client lambda layer and enable thick client#162

Merged
steventux merged 4 commits intomainfrom
include-oracle-client-in-lambda-layer
Jul 29, 2025
Merged

Publish Oracle client lambda layer and enable thick client#162
steventux merged 4 commits intomainfrom
include-oracle-client-in-lambda-layer

Conversation

@steventux
Copy link
Contributor

@steventux steventux commented Jul 28, 2025

Context

The BCSS development team have switched from an Oracle RDS instance to an On Prem instance which now has network encryption enabled.
This configuration difference won't work with Python's oracledb driver when run in the simpler Thin mode and requires us to enable Thick mode.
Thick mode needs Oracle client libraries present in the lambda layer and a different initialisation call in the Python code apparently.

Review notes

The oracle client layer was hand built and deployed to AWS via S3 to avoid inline deploy/update size limits. This step could be automated with more time but it works and won't change often so for now it's out of scope.

We also have 2 references to the oracle client layer which should be DRYed up, possibly by converting the terraform tfvars file to JSON and using jq to read into the Github deploy lambda layers workflow.

@steventux steventux changed the title Include Oracle client files in lambda layer Include Oracle client files and enable thick client Jul 28, 2025
@steventux steventux force-pushed the include-oracle-client-in-lambda-layer branch from 1452eff to 2743f04 Compare July 28, 2025 13:42
@steventux steventux marked this pull request as ready for review July 28, 2025 13:42
@steventux steventux requested a review from dnimmo July 28, 2025 13:52
@steventux steventux enabled auto-merge July 28, 2025 13:57
@steventux steventux disabled auto-merge July 28, 2025 15:24
@steventux steventux marked this pull request as draft July 28, 2025 15:24
See https://python-oracledb.readthedocs.io/en/latest/user_guide/initialization.html
We use thick mode to handle encrypted db network configuration.
We only use thick mode on deployed AWS environments where on prem dbs
have this config.
@steventux steventux force-pushed the include-oracle-client-in-lambda-layer branch from 2743f04 to 90d6020 Compare July 28, 2025 16:00
@steventux steventux changed the title Include Oracle client files and enable thick client Public Oracle client as lambda layer and enable thick client Jul 28, 2025
@steventux steventux changed the title Public Oracle client as lambda layer and enable thick client Publish Oracle client as lambda layer and enable thick client Jul 28, 2025
@steventux steventux changed the title Publish Oracle client as lambda layer and enable thick client Publish Oracle client lambda layer and enable thick client Jul 28, 2025
@steventux steventux force-pushed the include-oracle-client-in-lambda-layer branch 2 times, most recently from 4c77fbb to 8281fef Compare July 28, 2025 16:21
Includes the oracle client layer when publishing / updating lambda layers.
At present this is hardcoded. We could define the ARN in json and read back from than to avoid definition in 2 places.
@steventux steventux force-pushed the include-oracle-client-in-lambda-layer branch from 8281fef to 66cf840 Compare July 28, 2025 16:26
@steventux steventux marked this pull request as ready for review July 28, 2025 16:30
@steventux steventux added this pull request to the merge queue Jul 29, 2025
Merged via the queue into main with commit c3e727f Jul 29, 2025
10 checks passed
@steventux steventux deleted the include-oracle-client-in-lambda-layer branch July 29, 2025 09:32
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