Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Error on assuming role with required MFA #35

Closed
raphlcx opened this issue Apr 13, 2021 · 3 comments · Fixed by #351
Closed

Error on assuming role with required MFA #35

raphlcx opened this issue Apr 13, 2021 · 3 comments · Fixed by #351
Assignees
Labels
bug Something isn't working

Comments

@raphlcx
Copy link

raphlcx commented Apr 13, 2021

Summary

Hi, I'm getting an error when attempting to assume into a role which requires MFA.

Reproduction scenario

First, create an AWS IAM role and require MFA when assuming into the role. This guide might help.

Then, in ~/.aws/config:

[profile aaa]
aws_access_key_id = ...
aws_secret_access_key = ...

[profile bbb]
region = us-east-1
role_arn = arn:aws:iam::xxx:role/the-role-to-assume
mfa_serial = arn:aws:iam::xxx:mfa/my-user
source_profile = aaa

Execute the command:

AWS_PROFILE=bbb cloudquery fetch --dsn '...'

Error:

Error: rpc error: code = Unknown desc = assume role with MFA enabled, but AssumeRoleTokenProvider session option not set.
@yevgenypats yevgenypats added the bug Something isn't working label Nov 14, 2021
@zagronitay zagronitay linked a pull request Dec 15, 2021 that will close this issue
@raphlcx
Copy link
Author

raphlcx commented Dec 17, 2021

Hi @zagronitay , was this resolved? Or any workarounds if otherwise?

@yevgenypats
Copy link
Member

@raphlcx
Copy link
Author

raphlcx commented Dec 20, 2021

Hi @raphlcx, This is in PR right now - https://github.com/cloudquery/cq-provider-aws/pull/351/files

Noted, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants