Skip to content

Commit

Permalink
fix(credential-provider-node): environment variable `AWS_EC2_METADATA…
Browse files Browse the repository at this point in the history
…_DISABLED` condition

Setting the environment variable `AWS_EC2_METADATA_DISABLED` to
"false" causes the condition to evaluate as `true`, which disables
the IMDS credentials check.
  • Loading branch information
upsetbit committed Jan 17, 2025
1 parent c4dcd47 commit 99f810d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/credential-provider-node/src/remoteProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const remoteProvider = async (
return chain(fromHttp(init), fromContainerMetadata(init));
}

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

0 comments on commit 99f810d

Please sign in to comment.