Aws-cli: Feature - Specify the AWS_SESSION_DURATION for MFA session tokens

Created on 4 Aug 2017  路  5Comments  路  Source: aws/aws-cli

Similar to #2177, however would like to specify the session duration to a configurable period, so can specify a longer period.

Expose environment variable of AWS_SESSION_DURATION and session-duration in the ~/.aws/config.


aws-cli/1.11.127 Python/2.7.12 Linux/4.4.0-81-generic botocore/1.5.90

closing-soon guidance service-api

Most helpful comment

Hi,

Yes using with mfa e.g.

[profile photobox]
role_arn = arn:aws:iam::xxxx:role/<REPLACE-ME-ROLE>
source_profile = photobox-jump
mfa_serial = arn:aws:iam::xxx:mfa/<REPLACE-ME-EMAIL>

Thanks

Andy

All 5 comments

The session duration would be useful if we supported the sts get-session-token as a credential provider, but the assume-role provider we currently support only lets you shorten the duration. Did you want to use this for the assume role provider with MFA? If so, we'd have to get the service to support specifying longer durations first.

Hi,

Yes using with mfa e.g.

[profile photobox]
role_arn = arn:aws:iam::xxxx:role/<REPLACE-ME-ROLE>
source_profile = photobox-jump
mfa_serial = arn:aws:iam::xxx:mfa/<REPLACE-ME-EMAIL>

Thanks

Andy

this is still so actual .. please consider :) tnx

@ajohnstone and @drAlberT - Thanks for your feedback. Currently the service does not use the assume role provider with MFA. This feature would be a request for the IAM Service team. It is recommended to reach out on the AWS IAM forums or contact AWS Support. If the service team approves and adds this feature it will be exposed from the API to the CLI.

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

Was this page helpful?
0 / 5 - 0 ratings