Skip to content

Comments

TIMX 541 - handle missing HOME env in AWS Lambda#165

Merged
ghukill merged 1 commit intoepic-TIMX-515from
TIMX-541-extension-installation-lambda-context
Aug 14, 2025
Merged

TIMX 541 - handle missing HOME env in AWS Lambda#165
ghukill merged 1 commit intoepic-TIMX-515from
TIMX-541-extension-installation-lambda-context

Conversation

@ghukill
Copy link
Contributor

@ghukill ghukill commented Aug 14, 2025

NOTE: extends #164.

Purpose and background context

Provide location for DuckDB extensions if HOME not set.

Why these changes are being introduced:

In the AWS Lambda context, the HOME env var is empty string ''. DuckDB has a canned error response for this, suggesting to, "Specify a home directory using the SET home_directory='/path/to/dir' option".

How this addresses that need:

If HOME is unset or empty string, set an explicit secret and extension directory at /tmp/.duckdb/* locations.

How can a reviewer manually see the effects of these changes?

Successful run in Dev 1 as part of StepFunction (link):

Screenshot 2025-08-14 at 2 57 04 PM

Ultimatley the run failed, but that was expected; it was the success of Lambdas:Load step here that was important 😎.

Includes new or updated dependencies?

NO

Changes expectations for external applications?

YES: AWS Lambda will successfully setup DuckDB context

What are the relevant tickets?

Why these changes are being introduced:

In the AWS Lambda context, the HOME env var is empty string ''.
DuckDB has a canned error response for this, suggesting to,
"Specify a home directory using the SET
home_directory='/path/to/dir' option".

How this addresses that need:

If HOME is unset or empty string, set an explicit secret and extension
directory at `/tmp/.duckdb/*` locations.

Side effects of this change:
* None

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/TIMX-541
@ghukill ghukill marked this pull request as ready for review August 14, 2025 18:58
@ghukill ghukill requested a review from a team August 14, 2025 18:58
@ghukill ghukill changed the base branch from epic-TIMX-515 to TIMX-540-ecs-duckdb-s3-connection August 14, 2025 18:59
@ghukill ghukill changed the base branch from TIMX-540-ecs-duckdb-s3-connection to epic-TIMX-515 August 14, 2025 19:07
@ghukill ghukill merged commit 4ccc90a into epic-TIMX-515 Aug 14, 2025
2 checks passed
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