From 9426f23982be1b9ff5536d78ae1f53daf25aa4c3 Mon Sep 17 00:00:00 2001 From: imtibbet Date: Wed, 29 Mar 2023 10:31:25 -0600 Subject: [PATCH 1/2] Update resolveAssumeRoleCredentials.ts https://github.com/aws/aws-sdk-js-v3/issues/4589 --- .../src/resolveAssumeRoleCredentials.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/credential-provider-ini/src/resolveAssumeRoleCredentials.ts b/packages/credential-provider-ini/src/resolveAssumeRoleCredentials.ts index e0c32e4f1ef9a..d3015aa37067e 100644 --- a/packages/credential-provider-ini/src/resolveAssumeRoleCredentials.ts +++ b/packages/credential-provider-ini/src/resolveAssumeRoleCredentials.ts @@ -21,6 +21,14 @@ export interface AssumeRoleParams { */ RoleSessionName: string; + /** + * Specifies the maximum duration of the role session, in seconds. + The value can range from 900 seconds (15 minutes) up to the maximum + session duration setting for the role (which can be a maximum of 43200). + This is an optional parameter and by default, the value is set to 3600 seconds. + */ + DurationSeconds?: number; + /** * A unique identifier that is used by third parties when assuming roles in * their customers' accounts. @@ -100,6 +108,7 @@ export const resolveAssumeRoleCredentials = async ( RoleArn: data.role_arn!, RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`, ExternalId: data.external_id, + DurationSeconds: data.duration_seconds, }; const { mfa_serial } = data; From ef73ec5faf00e61175ab88b0692481f0ded9f937 Mon Sep 17 00:00:00 2001 From: imtibbet Date: Thu, 30 Mar 2023 07:41:20 -0600 Subject: [PATCH 2/2] Update resolveAssumeRoleCredentials.ts fix comment formatting --- .../src/resolveAssumeRoleCredentials.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/credential-provider-ini/src/resolveAssumeRoleCredentials.ts b/packages/credential-provider-ini/src/resolveAssumeRoleCredentials.ts index d3015aa37067e..859bd16227fbf 100644 --- a/packages/credential-provider-ini/src/resolveAssumeRoleCredentials.ts +++ b/packages/credential-provider-ini/src/resolveAssumeRoleCredentials.ts @@ -23,9 +23,9 @@ export interface AssumeRoleParams { /** * Specifies the maximum duration of the role session, in seconds. - The value can range from 900 seconds (15 minutes) up to the maximum - session duration setting for the role (which can be a maximum of 43200). - This is an optional parameter and by default, the value is set to 3600 seconds. + * The value can range from 900 seconds (15 minutes) up to the maximum + * session duration setting for the role (which can be a maximum of 43200). + * This is an optional parameter and by default, the value is set to 3600 seconds. */ DurationSeconds?: number;