Skip to content
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

Can we make MFA session tokens expire in less than 12 hours? #2177

Closed
gerrymiller opened this issue Sep 19, 2016 · 2 comments
Closed

Can we make MFA session tokens expire in less than 12 hours? #2177

gerrymiller opened this issue Sep 19, 2016 · 2 comments

Comments

@gerrymiller
Copy link

We are using IAM roles with CLI, as described in this article, by setting our ~/.aws/config file to look something like this:

[profile poweruser]
role_arn = arn:aws:iam::111111111111:role/PowerUser
source_profile = default
mfa_serial = arn:aws:iam::111111111111:mfa/johndoe

Is there a configuration setting we can use to make the resultant session token expire in less than the default 12 hours? I know that's an option in get-session-token (using the --duration-seconds parameter) but can't figure out if this is possible when configuring AWSCLI to prompt for an MFA code.

If this is currently not possible, it would make a great new feature!

@JordonPhillips
Copy link
Member

There is not currently a way to set the duration-seconds of the call, but since under the hood we're using assume-role not get-session-token, the default duration is 1 hour rather than 12. I'm not sure that less than one hour is particularly useful, what do you think?

@gerrymiller
Copy link
Author

That's awesome, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants