Skip to content

Commit 4bd3c23

Browse files
author
Ran Vaknin
committed
fix(credential-provider-ini): add DurationSeconds to assumeRole interface and params
1 parent 515ea2e commit 4bd3c23

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/credential-provider-ini/src/resolveAssumeRoleCredentials.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ export interface AssumeRoleParams {
3939
* The value provided by the MFA device.
4040
*/
4141
TokenCode?: string;
42+
43+
/**
44+
* The duration, in seconds, of the role session.
45+
*/
46+
DurationSeconds?: number;
4247
}
4348

4449
interface AssumeRoleWithSourceProfile extends Profile {
@@ -108,6 +113,7 @@ export const resolveAssumeRoleCredentials = async (
108113
RoleArn: data.role_arn!,
109114
RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`,
110115
ExternalId: data.external_id,
116+
DurationSeconds: parseInt(data.duration_seconds || "3600", 10),
111117
};
112118

113119
const { mfa_serial } = data;

0 commit comments

Comments
 (0)