Skip to content

feat: Support assuming a role with MFA token#18

Merged
tsub merged 1 commit intotsub:masterfrom
koooge:mfa_profile
Oct 23, 2019
Merged

feat: Support assuming a role with MFA token#18
tsub merged 1 commit intotsub:masterfrom
koooge:mfa_profile

Conversation

@koooge
Copy link
Copy Markdown
Contributor

@koooge koooge commented Oct 23, 2019

Hi. I got an error wiht MFA due to not supported it.

panic: AssumeRoleTokenProviderNotSetError: assume role with MFA enabled, but AssumeRoleTokenProvider session option not set.

This PR gives AssumeRoleTokenProvider to the session.
https://docs.aws.amazon.com/sdk-for-go/api/aws/session/

looks this:

$ go run main.go --profile hoge edit s3://path/to/file
Assume Role MFA token code:

Signed-off-by: koooge <koooooge@gmail.com>
Copy link
Copy Markdown
Owner

@tsub tsub left a comment

Choose a reason for hiding this comment

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

Thank you for PR!
It worked as expected. LGTM 😄

@tsub tsub merged commit 6a92c1a into tsub:master Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants