trek10inc / awsume

A utility for easily assuming AWS IAM roles from the command line.
https://awsu.me
MIT License
488 stars 90 forks source link

Invalid type for parameter DurationSeconds, value: 43200, type: <class 'str'>, valid types: <class 'int'> #66

Closed michaelwittig closed 4 years ago

michaelwittig commented 4 years ago

Hi!

My ~/.aws/config looks like this:

[profile p1]
region = eu-west-1
role_arn = arn:aws:iam::111111111111:role/XXX
source_profile = p0
mfa_serial = arn:aws:iam::222222222222:mfa/xxx
duration_seconds = 43200
role_duration = 43200

When I run awsume, I get:

$ awsume p1
Enter MFA token:
Parameter validation failed:
Invalid type for parameter DurationSeconds, value: 43200, type: <class 'str'>, valid types: <class 'int'>

If I remove duration_seconds from ~/.aws/config it works.

I use the following version installed via pip on macOS 10.14.6:

$ awsume -v
4.1.2
mbarneyjr commented 4 years ago

Thanks for bringing this issue to our attention!

I'll push a fix shortly and deploy later today

michaelwittig commented 4 years ago

Thanks. My understanding of the error: it comes from boto3. But I'm not used to python...

mbarneyjr commented 4 years ago

Bug should be fixed in release 4.1.3, I'll close for now but feel free to re-open if you're still experiencing this issue

michaelwittig commented 4 years ago

I can confirm that the new version 4.1.3 works