TIMX 541 - handle missing HOME env in AWS Lambda#165
Merged
ghukill merged 1 commit intoepic-TIMX-515from Aug 14, 2025
Merged
Conversation
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
ehanson8
approved these changes
Aug 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
HOMEenv 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
HOMEis 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):
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?