Move Config to Writeable Dir#15
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a pattern for shipping “baked” per-package configuration inside the Lambda container image, then mirroring it into a writable /tmp/config/ directory at cold start, so packages with import-time config/logging initialization can run under Lambda’s read-only filesystem constraints.
Changes:
- Adds documentation for the repo → image →
/tmpconfig mirroring approach and how to wire packages viaENV. - Adds a baked
ccsdspyconfiguration file undersrc/config/ccsdspy/. - Seeds
/tmp/configfrom/lambda_function/configinentry_script.shand setsccsdspy_CONFIGDIRin the Dockerfile.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| lambda_function/src/config/README.md | Documents the baked-config mirroring mechanism and Dockerfile/entry script wiring for packages. |
| lambda_function/src/config/ccsdspy/config.yml | Adds a baked ccsdspy config intended to control import-time behavior under Lambda’s writable-path constraints. |
| lambda_function/entry_script.sh | Copies baked config into /tmp/config before starting the runtime. |
| lambda_function/Dockerfile | Exposes ccsdspy_CONFIGDIR pointing at /tmp/config/ccsdspy so the package reads from the writable mirror. |
Comments suppressed due to low confidence (1)
lambda_function/entry_script.sh:19
$@is unquoted in theexeccalls, which can break argument passing if any argument contains whitespace or shell glob characters. Quoting it ("$@") is the safe, standard pattern in POSIX sh.
if [ -z "${AWS_LAMBDA_RUNTIME_API}" ]; then
exec /usr/local/bin/aws-lambda-rie python3 -m awslambdaric $@
else
exec python3 -m awslambdaric $@
fi
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15 +/- ##
=======================================
Coverage ? 51.79%
=======================================
Files ? 2
Lines ? 195
Branches ? 0
=======================================
Hits ? 101
Misses ? 94
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
No description provided.