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

install? #33

Open
gangofnuns opened this issue Jan 26, 2022 · 28 comments
Open

install? #33

gangofnuns opened this issue Jan 26, 2022 · 28 comments

Comments

@gangofnuns
Copy link

This is probably obvious to go developers, but how does one install these?
Looks like a wonderfully interesting tool.

@AndreZiviani
Copy link
Owner

Just download the binary for your platform/architecture from the releases page, no installation or anything else required

I’m compiling for the most popular platform/architectures but only Linux x86 is tested

@gangofnuns
Copy link
Author

gangofnuns commented Jan 29, 2022 via email

@AndreZiviani
Copy link
Owner

Hi @gangofnuns, I've made some improvements on error checking/handling and quickly tested it on Intel MacOS Catalina please check this release.

I'm planning on rearchitecting the code to improve error handling and error messages but I can't give an ETA on that, if you have problems with this new release please let me know and I will try to find a Mac with a more recent version

@gangofnuns
Copy link
Author

gangofnuns commented Jan 30, 2022 via email

@AndreZiviani
Copy link
Owner

What happens when you run it? It is indeed not signed, I don’t have an apple developer account

@gangofnuns
Copy link
Author

gangofnuns commented Jan 31, 2022 via email

@AndreZiviani
Copy link
Owner

Hi Marc
I will try to test it on Big Sur, in the meantime can you try renaming your ~/.aws dir to something else and try running it again? just to make sure its not something related to your config

@AndreZiviani
Copy link
Owner

@gangofnuns I found the issue, CI was building using an old Golang version, this new release should hopefully work
https://github.com/AndreZiviani/aws-fuzzy/releases/tag/v0.11.0-rc4

@AndreZiviani
Copy link
Owner

Hi @gangofnuns, did it work?

@gangofnuns
Copy link
Author

gangofnuns commented Feb 11, 2022 via email

@AndreZiviani
Copy link
Owner

Hey @gangofnuns looks like the issue was with the software I used to compress the binary (UPX), this new release was made without it hopefully it will finally work
https://github.com/AndreZiviani/aws-fuzzy/releases/tag/v0.12.0-rc1

@gangofnuns
Copy link
Author

Hey AndreZiviani --

The binary does indeed run now. However, there's a problem when running either config or chart where it throws errors, complaining it wasn't build with the 'cdo' library, and thus cannot load a critical dependency: sqlite3. Progress, however. Best of luck!

@AndreZiviani
Copy link
Owner

Hi @gangofnuns

I was using sqlite to cache some results but there isn't a simple way to cross compile it so I dropped it to use a simpler approach:
https://github.com/AndreZiviani/aws-fuzzy/releases/tag/v0.12.0-rc2

@gangofnuns
Copy link
Author

gangofnuns commented Mar 14, 2022 via email

@AndreZiviani
Copy link
Owner

that bug occurred only on the first run so I didn't give much attention but after removing sqlite it happens every time, sorry for all this back and forth, thanks for your patience and testing

https://github.com/AndreZiviani/aws-fuzzy/releases/tag/v0.12.0-rc3

@gangofnuns
Copy link
Author

gangofnuns commented Mar 15, 2022

Hey AndreZiviani --

Definitely getting closer! Now, when I run the app, it seems to try to do something , but still fails a bit. I'm not completely sure it's a problem with your software -- but it seems to be repeatedly trying and failing to log into sso, even after it is configured on my end. I have other credentials I can put into the environment, but they do not seem to work either. Here is the output:

~/local/bintools/test$ ./aws-fuzzy_0.12.0-rc3_darwin_amd64 sso login -p arch
failed to get role credentials, the SSO session has expired or is invalid
failed to get role credentials, the SSO session has expired or is invalid
failed to get role credentials, the SSO session has expired or is invalid
failed to get role credentials, the SSO session has expired or is invalid
[...]

Produces a few hundred lines like the above then seems to get caught
in a loop. Sending a sig QUIT stops the process.

@AndreZiviani
Copy link
Owner

hi @gangofnuns thats something that happens even with official aws cli, try removing your SSO cache:
rm ~/.aws/sso/cache/*.json

and log again:
aws-fuzzy sso login

@rowbot1
Copy link

rowbot1 commented May 18, 2022

I get an error
profile default not found!
I ran the command ./aws-fuzzy_0.12._linux_amd64 config ec2
Thanks

@AndreZiviani
Copy link
Owner

Hi @rowbot1
Either set AWS_PROFILE environment variable or use the -p <profile name> flag

@rowbot1
Copy link

rowbot1 commented May 18, 2022

I did this but get the same error

@rowbot1
Copy link

rowbot1 commented May 18, 2022

in .aws/credentials
[default]
aws_access_key_id=xxxx
aws_secrect_access_key=xxx
aws_session_token=xx

command
./aws-fuzzy_0.12.0_linux_amd64 config ec2 -p default

@AndreZiviani
Copy link
Owner

I've never tested it with static credentials, only with SSO, will try it later

@rowbot1
Copy link

rowbot1 commented May 18, 2022

thank you

@AndreZiviani
Copy link
Owner

AndreZiviani commented May 18, 2022

@rowbot1 whats in your ~/.aws/config?

@gangofnuns
Copy link
Author

gangofnuns commented May 19, 2022 via email

@AndreZiviani
Copy link
Owner

Hey, just fyi, I was able to get SSO to authenticate, but never IAM. It could be I was just using the wrong combinations of flags.

Can you post your (redacted) ~/.aws/config?
I did some tests yesterday but I could not use plain IAM credentials I had to use it with MFA, turn out that AWS SDK does not implement an automatic flow when using MFA without assume role so I made some changes to support it (can crease a new release if you want to try it)

The tool seems prodigious but documentation was a bit harder to come by. Love it though.

Thanks a lot! I agree that the documentation is lacking... I've just switched jobs and we are not using SSO yet so I will improve on IAM authentication, documentation and (hopefully) features.

@AndreZiviani
Copy link
Owner

AndreZiviani commented May 19, 2022

I will post my config if you want to compare

$ cat ~/.aws/config
[profile dev]
region = us-east-1

$ cat ~/.aws/credentials
[dev]
aws_access_key_id = AKIA[...]
aws_secret_access_key = [...]
mfa_serial = arn:aws:iam::123456789012:mfa/[...]

@rowbot1
Copy link

rowbot1 commented May 20, 2022

cat ~/.aws/config
[default]
region = eu-west-3
output = json
cli_history = enabled

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

No branches or pull requests

3 participants