Skip to content

Update resolveAssumeRoleCredentials.ts #4590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would need to be converted to a number

};

const { mfa_serial } = data;
Expand Down