Aws-vault: AWS session expiring before current timestamp due to session using UTC timezone

Created on 19 Aug 2020  路  6Comments  路  Source: 99designs/aws-vault

  • [x] I am using the latest release of AWS Vault
  • [ ] I have provided my .aws/config (redacted if necessary)
  • [ ] I have provided the debug output using aws-vault --debug (redacted if necessary)

When I run a command via aws-vault it is constantly requiring me to enter my MFA token. I realised it is because the session is expiring before the current timestamp due to the session using UTC, and my system currently being in BST.

$ aws-vault --version
v5.4.4
$ date ; aws-vault exec myprofile -- env | grep AWS_SESSION_EXPIRATION
Wed 19 Aug 2020 16:46:48 BST
Enter token for arn:aws:iam::1234567890:mfa/gawbul: 123456
AWS_SESSION_EXPIRATION=2020-08-19T16:42:01Z

All 6 comments

Hey there @gawbul - would you be up for giving that a shot using the latest v6 beta release? It should be working as expected from there (ref: #600).

Hey @ajkerrigan, thanks for the reply - very happy to give it a try with the new beta 馃憤

Still showing as the UTC timestamp for the environment variable, but it isn't asking me for my MFA repeatedly anymore, so looks like it may be fixed 馃憤

$ ~/Downloads/aws-vault --version
v6.0.0-beta10
$ date
Thu 20 Aug 2020 11:00:15 BST
$ ~/Downloads/aws-vault exec myprofile -- env | grep AWS_SESSION_EXPIRATION
Enter token for arn:aws:iam::1234567890:mfa/gawbul: 123456
AWS_SESSION_EXPIRATION=2020-08-20T10:55:17Z
$ ~/Downloads/aws-vault exec myprofile -- env | grep AWS_SESSION_EXPIRATION
AWS_SESSION_EXPIRATION=2020-08-20T10:55:17Z

Happy for me to close this, @ajkerrigan?

Happy for me to close this, @ajkerrigan?

Sure thing @gawbul, if you're happy I'm happy :). It looks like your role duration and UTC offset are both 1 hour, which makes it look strange to see your local time followed immediately by the UTC expiration time. But the behavior looks right to me.

Cool! Thanks for your help 馃檹

Was this page helpful?
0 / 5 - 0 ratings

Related issues

raguay picture raguay  路  4Comments

shivaman picture shivaman  路  6Comments

gws picture gws  路  5Comments

mtibben picture mtibben  路  7Comments

ismailyenigul picture ismailyenigul  路  4Comments