Skip to content

Commit 9ad490a

Browse files
authored
fix(credential-provider-node): handle string value AWS_EC2_METADATA_DISABLED=false (#6823)
Setting the environment variable `AWS_EC2_METADATA_DISABLED` to "false" causes the condition to evaluate as `true`, which disables the IMDS credentials check.
1 parent f9e0982 commit 9ad490a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/credential-provider-node/src/remoteProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const remoteProvider = async (
2424
return chain(fromHttp(init), fromContainerMetadata(init));
2525
}
2626

27-
if (process.env[ENV_IMDS_DISABLED]) {
27+
if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") {
2828
return async () => {
2929
throw new CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger });
3030
};

0 commit comments

Comments
 (0)