mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
* fix(lambda): inject log, endpoint, and hostname env vars into Lambda containers Three missing environment variables prevented Lambda functions from running correctly with newer runtimes and from reaching back into Floci: and AWS_LAMBDA_LOG_STREAM_NAME to be set before the runtime initialises. Floci computed both values but only used them for log streaming — they were never added to the container's env list, causing a hard PlatformError on boot. their container. FLOCI_HOSTNAME, FLOCI_ENDPOINT, and AWS_ENDPOINT_URL are now injected so any AWS SDK client instantiated inside the function uses Floci automatically, without requiring code changes. When the embedded DNS server is active (Floci running in Docker), FLOCI_HOSTNAME is set to the configured hostname (e.g. "floci") rather than a raw IP, because the DNS server is already wired into each Lambda container as its resolver and will resolve that name correctly. In local dev mode (no embedded DNS), the Docker-reachable host address is used as a fallback. Closes #628 Closes #629 * feat(lambda): implement PutFunctionEventInvokeConfig and sibling endpoints (#632) Adds the five event-invoke-config REST endpoints that Terraform's aws_lambda_function_event_invoke_config resource requires: - PUT /2019-09-25/functions/{name}/event-invoke-config — replaces config - POST — partial update (merge) - GET — retrieve config, 404 if absent - DELETE — remove config, 404 if absent - GET .../event-invoke-config/list — list all qualifiers New files: FunctionEventInvokeConfig model (with @RegisterForReflection and correct AWS JSON field names), LambdaEventInvokeController, and LambdaEventInvokeConfigTest (10 unit tests). Storage is an in-memory ConcurrentHashMap keyed by region:functionArn:qualifier. Also fixes the ContainerLauncherTest and LambdaImageConfigTest setUp methods that were missing config.baseUrl() stubs required by the FLOCI_HOSTNAME/FLOCI_ENDPOINT env-var injection added in the branch.