Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error retreiving creds: failed to refresh cached credentials #205

Open
SantiRaposo opened this issue Oct 5, 2023 · 0 comments
Open

Error retreiving creds: failed to refresh cached credentials #205

SantiRaposo opened this issue Oct 5, 2023 · 0 comments

Comments

@SantiRaposo
Copy link

SantiRaposo commented Oct 5, 2023

Hello,

I'm having some trouble with the way the tool is assuming roles. Given the following configuration file:

# ~/.aws/credentials
[default]
aws_access_key_id=****
aws_secret_access_key=****
aws_session_token="*****"
aws_expiration=****


# ~/.aws/config
[profile example-profile]
role_arn = arn:aws:iam::*:role/example
source_profile=default
role_session_name = user@example.com

I get the following errors when running rain --debug info -p example-profile:

╰─❯ rain --debug info -p example-profile
DEBUG: Getting identity
DEBUG: Loading AWS config
DEBUG: Error retreiving creds: failed to refresh cached credentials, operation error STS: AssumeRole, https response error StatusCode: 403, RequestID: ****,  api error AccessDenied: User: arn:aws:sts::****:assumed-role/user@example.com/user@example.com is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::{destination_account}:role/example
panic: could not establish AWS credentials; please run 'aws configure' or choose a profile [recovered]
	panic: could not establish AWS credentials; please run 'aws configure' or choose a profile

However the AWS cli works perfectly fine. This does not work even if setting the AWS_PROFILE environment variable.

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

No branches or pull requests

2 participants