mpostument / awstaghelper

AWS bulk tagging tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when specifying a different profile

masonbivens opened this issue · comments

I'm receiving the following error when I attempt to specify an assumed role profile instead of the default credentials

➜ awstaghelper_0.15.0_Darwin_x86_64 ./awstaghelper cloudwatch get-cwlog-tags -f cloudwatch_logs_tags_dev.csv -r us-west-2 -t Name,Product,Purpose,Env,Region -p dev
2020/09/10 12:18:17 Not able to get log groupsNoCredentialProviders: no valid providers in chain. Deprecated.
	For verbose messaging see aws.Config.CredentialsChainVerboseErrors

Hello, please share how you assume role. I tested on assumed role with okta, and didn't get errors

I'm utilizing the native AWS cross account assume role functionality, below is a sanitized version of the credentials and config file

[default]
aws_access_key_id=XXXXXXX
aws_secret_access_key=XXXXXXX
region = us-west-2

[ops]
aws_access_key_id=XXXXXXX
aws_secret_access_key=XXXXXXX
region = us-west-2

[sandbox]
role_arn = arn:aws:iam::XXXXXXXXX:role/foobar-sysops
source_profile = ops
mfa_serial = arn:aws:iam::XXXXXXXXX:mfa/mason.bivens
region = us-west-2

[dev]
role_arn = arn:aws:iam::XXXXXXXXX:role/foobar-sysops
source_profile = ops
mfa_serial = arn:aws:iam::XXXXXXXXX:mfa/mason.bivens
region = us-west-2

[uat]
role_arn = arn:aws:iam::XXXXXXXXX:role/foobar-sysops
source_profile = ops
mfa_serial = arn:aws:iam::XXXXXXXXX:mfa/mason.bivens
region = us-west-2

[prod]
role_arn = arn:aws:iam::XXXXXXXXX:role/foobar-sysops
source_profile = ops
mfa_serial = arn:aws:iam::XXXXXXXXX:mfa/mason.bivens
region = us-west-2
[profile default]
cli_pager=
region = us-west-2

[profile ops]
cli_pager=
region = us-west-2

[profile sandbox]
cli_pager=
role_arn = arn:aws:iam::XXXXXXXX:role/foobar-sysops
source_profile = ops
mfa_serial = arn:aws:iam::XXXXXXXX:mfa/mason.bivens
region = us-west-2

[profile dev]
cli_pager=
role_arn = arn:aws:iam::XXXXXXXX:role/foobar-sysops
source_profile = ops
mfa_serial = arn:aws:iam::XXXXXXXX:mfa/mason.bivens
region = us-west-2

[profile uat]
cli_pager=
role_arn = arn:aws:iam::XXXXXXXX:role/foobar-sysops
source_profile = ops
mfa_serial = arn:aws:iam::XXXXXXXX:mfa/mason.bivens
region = us-west-2

[profile prod]
cli_pager=
role_arn = arn:aws:iam::XXXXXXXX:role/foobar-sysops
source_profile = ops
mfa_serial = arn:aws:iam::XXXXXXXX:mfa/mason.bivens
region = us-west-2

An assumed role not supported right now. I will work to add support