mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
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:
1 parent
d39bdf1c22
commit
33ce936d44
2 files changed
+67
No files matched your search
+3
@@ -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));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user