fix(lambda): inject default AWS credentials into Lambda containers (#623)

SDK calls inside Lambda containers fell through to IMDS and timed out
because AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKEN
were absent from the runtime environment. Inject placeholder values
before the user-supplied --environment so the SDK credential chain
resolves without IMDS, while still honouring user overrides via
Docker's last-wins duplicate-env semantics.
This commit is contained in:
Kenshin Okinaka authored and GitHub committed 2026-04-28 00:04:54 -05:00
1 parent d39bdf1c22
commit 33ce936d44
2 files changed
+67

No files matched your search

@@ -144,6 +144,9 @@ public class ContainerLauncher {
}
env.add("AWS_DEFAULT_REGION=us-east-1");
env.add("AWS_REGION=us-east-1");
env.add("AWS_ACCESS_KEY_ID=test");
env.add("AWS_SECRET_ACCESS_KEY=test");
env.add("AWS_SESSION_TOKEN=test");
if (fn.getEnvironment() != null) {
fn.getEnvironment().forEach((k, v) -> env.add(k + "=" + v));
}