Comments (10)
I think this is the problem:
cloudlens/internal/config/config.go
Lines 108 to 116 in d4c437a
IsExpired
might not be relevant for all types of authentications. I am using access_token + secret_token, and commenting out this check worked for me.
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.
from cloudlens.
@chinmay185
Oh! I forgot to mention. My credentials have not expired, I use them daily. Yet I am getting this error.
from cloudlens.
#4 fixes this.
from cloudlens.
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.
from cloudlens.
Same for me: I use aws with sso and get all the time this error message. I do a aws sso login
before starting cloudlens
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/[email protected]/command.go:920 +0x5b0
github.com/spf13/cobra.(*Command).ExecuteC(0x10140dd00)
github.com/spf13/[email protected]/command.go:1044 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/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
from cloudlens.
Like @dirien's report in #1 (comment), I use aws-vault as my credential process, with profiles using SSO.
from cloudlens.
I use MFA with my AWS login and before I login with MFA I would get the following error:
Credentials have expired
panic: aws session init failed -- AWS Credentials expired
After I login with MFA I get the following error:
failed to load AWS SDK config: assume role with MFA enabled, but AssumeRoleTokenProvider session option not set.
from cloudlens.
similar, but I'm using aws access key is and aws secret access key. AWS CLI works fine, but I get this from cloudlens:
cloudlens
Credentials have expired
panic: aws session init failed -- AWS Credentials expired
goroutine 1 [running]:
github.com/one2nc/cloudlens/cmd.run(0x22f2d20?, {0x1a272af?, 0x0?, 0x0?})
github.com/one2nc/cloudlens/cmd/root.go:73 +0x4ce
github.com/spf13/cobra.(*Command).execute(0x22f2d20, {0xc00010a200, 0x0, 0x0})
github.com/spf13/[email protected]/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x22f2d20)
github.com/spf13/[email protected]/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/command.go:968
github.com/one2nc/cloudlens/cmd.Execute()
github.com/one2nc/cloudlens/cmd/root.go:42 +0x25
main.main()
github.com/one2nc/cloudlens/main.go:8 +0x17
from cloudlens.
Hi,
installed on Linux mint and getting error like below
cloudlens
Credentials have expired
panic: aws session init failed -- AWS Credentials expired
goroutine 1 [running]:
github.com/one2nc/cloudlens/cmd.run(0x16ede00?, {0xe25ef7?, 0x0?, 0x0?})
github.com/one2nc/cloudlens/cmd/root.go:73 +0x4ce
github.com/spf13/cobra.(*Command).execute(0x16ede00, {0xc000034240, 0x0, 0x0})
github.com/spf13/[email protected]/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x16ede00)
github.com/spf13/[email protected]/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/command.go:968
github.com/one2nc/cloudlens/cmd.Execute()
github.com/one2nc/cloudlens/cmd/root.go:42 +0x25
main.main()
github.com/one2nc/cloudlens/main.go:8 +0x17
aws command normally work fine for me
Br,
from cloudlens.
I run into the same issue using aws-mfa
with --assume-role
to authenticate with AWS. I tested with v0.1.0
.
Here's the output:
Credentials have expired
panic: aws session init failed -- AWS Credentials expired
goroutine 1 [running]:
github.com/one2nc/cloudlens/cmd.run(0x123dda0?, {0x970b5a?, 0x0?, 0x0?})
github.com/one2nc/cloudlens/cmd/root.go:73 +0x4d0
github.com/spf13/cobra.(*Command).execute(0x123dda0, {0x400009e220, 0x0, 0x0})
github.com/spf13/[email protected]/command.go:920 +0x5c8
github.com/spf13/cobra.(*Command).ExecuteC(0x123dda0)
github.com/spf13/[email protected]/command.go:1044 +0x368
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/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
from cloudlens.
Related Issues (20)
- not reading AWS SSO credentials HOT 2
- [FEAT] With Self Updating Feature, Can we also have auto-update HOT 2
- [Bug] Doesn't work with IAM roles HOT 4
- Sorting S3 files by size is alphabetical instead of by size HOT 1
- Project status and ECS Support HOT 4
- Add Google Cloud functionality
- Add support for localstack
- Update readme to have localstack documentation
- Filter/search functionality HOT 1
- New versions question. HOT 1
- When is the next release planned? HOT 2
- immediate panic after selecting a provider HOT 2
- add the listing of regions in the gcp cloud provider
- improve test coverage in the gcp cloud provider
- add a pr and issue template
- support fargate for aws cloud provider
- add devcontainer for easy deployment
- proposal to add listing of different databases that are running in the cloud
- add support for different skin colour
- Include Ec2 instance name column
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudlens.