Skip to content

Commit 4fff20a

Browse files
committed
exclusion of undefined accountId in creds object
1 parent 6383fef commit 4fff20a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/credential-provider-imds/src/remoteProvider/ImdsCredentials.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ export const fromImdsCredentials = (creds: ImdsCredentials): AwsCredentialIdenti
3030
secretAccessKey: creds.SecretAccessKey,
3131
sessionToken: creds.Token,
3232
expiration: new Date(creds.Expiration),
33-
accountId: creds.AccountId,
33+
...(creds.AccountId && { accountId: creds.AccountId }),
3434
});

0 commit comments

Comments
 (0)