Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

AWS nuke not working with credential_process + source_profile + role_arn combination #397

Closed
reegnz opened this issue Aug 28, 2019 · 1 comment · Fixed by #398
Closed

Comments

@reegnz
Copy link
Contributor

reegnz commented Aug 28, 2019

Expected Behaviour

Given config:

[profile test]
region = us-west-2
credential_process = cat ./cred.json

[profile testnoassume]
source_profile = test

[profile testassume]
source_profile = test
role_arn = arn:aws:iam::222222222222:role/OrganizationAccountAccessRole

When:

  • executing aws-nuke with profile testassume or testnoassume

Then:

  • aws-nuke should connect to aws properly.

Actual Behaviour

aws-nuke fails the following commands:

$ aws-nuke --config config.yaml --profile testassume
Error: failed to create default session in us-east-1: SharedConfigAssumeRoleError: failed to load assume role for arn:aws:iam::222222222222:role/OrganizationAccountAccessRole, source profile has no shared credentials

and

$ aws-nuke --config config.yaml --profile testnoassume
Error: failed get caller identity: NoCredentialProviders: no valid providers in chain. Deprecated.
	For verbose messaging see aws.Config.CredentialsChainVerboseErrors

Additional Context

https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#sourcing-credentials-from-external-processes

Very similar issue:
hashicorp/packer#7142 (comment)

Looks like this could be an SDK issue, so upgrading to the latest go sdk might solve this.

@reegnz
Copy link
Contributor Author

reegnz commented Aug 28, 2019

i will try and upgrade to a newer sdk and see if it fixes this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant