-
Notifications
You must be signed in to change notification settings - Fork 26
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: panic: aws session init failed -- AWS Credentials expired #1
Comments
Thanks for the details @sagarrakshe. We recently changed this behaviour, but on second thoughts, I think we should launch the app, even if the credentials are expired/invalid/not found (instead of panicing). In the app, we can show a flash message indicating to fix the credentials. We'll fix this soon. |
@chinmay185 |
Same for me: I use aws with sso and get all the time this error message. I do a cloudlens
Profile 'default' not found, using profile 'private'... Credentials have expired
panic: aws session init failed -- AWS Credentials expired
goroutine 1 [running]:
github.com/one2nc/cloudlens/cmd.run(0x10140dd00?, {0x100966704?, 0x0?, 0x0?})
github.com/one2nc/cloudlens/cmd/root.go:73 +0x4c8
github.com/spf13/cobra.(*Command).execute(0x10140dd00, {0x14000118200, 0x0, 0x0})
github.com/spf13/cobra@v1.6.1/command.go:920 +0x5b0
github.com/spf13/cobra.(*Command).ExecuteC(0x10140dd00)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.6.1/command.go:968
github.com/one2nc/cloudlens/cmd.Execute()
github.com/one2nc/cloudlens/cmd/root.go:42 +0x28
main.main()
github.com/one2nc/cloudlens/main.go:8 +0x1c |
Like @dirien's report in #1 (comment), I use aws-vault as my credential process, with profiles using SSO. |
I use MFA with my AWS login and before I login with MFA I would get the following error:
After I login with MFA I get the following error:
|
similar, but I'm using aws access key is and aws secret access key. AWS CLI works fine, but I get this from cloudlens:
|
I think this is the problem: cloudlens/internal/config/config.go Lines 108 to 116 in d4c437a
If you ask me, this check can probably be skipped altogether. Unless the tool is refreshing the token on expiry or taking some other action. If it's expired, just let the operations fail with whatever error the AWS SDK throws. |
- Move session logic to aws/config.go
Hi, installed on Linux mint and getting error like below
aws command normally work fine for me Br, |
I run into the same issue using Here's the output:
|
#4 fixes this. |
I installed the tool and launched it,
I didn't have a default profile set in
~/.aws/credentials
so I got messageI used
--profile
arg and I got this errorSame error when I copied my AWS credentials to
default
in ~/.aws/credentials.Machine Info
MaC OSX M1 Ventura 13.0
The text was updated successfully, but these errors were encountered: