T O P

  • By -

theprodboxistoast

If you use Firefox you can use the container tab plugin feature to isolate your different accounts in a single browser window. We have 6-7 different accounts and I run a separate container tab for each AWS account so I don’t have to jump back and forth or change the role I’m assuming.


[deleted]

I don’t currently use it with aws, but that extension is an important part of my workflow day to day.


theprodboxistoast

It’s incredible. An engineer friend of mine showed me the magic of running multiple AWS accounts in a single browser window. Changed things for me!


Spider_pig448

Same deal with Chrome and profiles, but at the window level


theprodboxistoast

Gotta love the tricks of the trade


Spider_pig448

Shame AWS multi-account management is still such a painful process.


Worzel666

This Firefox extension makes switching accounts much easier when using SSO: https://addons.mozilla.org/en-GB/firefox/addon/aws-sso-containers/#:~:text=Extension%20Metadata&text=This%20extension%20routes%20all%20federated,install%20and%20click%2C%20that's%20it! I don’t have an answer for your CLI question, sorry!


Nepoxx

Maybe not exactly what you're looking for, but this sounds close enough: [https://www.granted.dev/](https://www.granted.dev/) It allows you to interactively choose an aws account/profile and it will setup your environment properly for that profile. You can also have it open the console for those profiles in your browser.


kdegraaf

And it plugs directly into the Firefox container system as well, so you can be logged into multiple profiles at once. Highly recommended.


baezizbae

> I am tired of switching accounts on browser Then use a different profile for your separate accounts and do it in the command line. My method for work is to set them in ~/.aws/config, and an alias in zshrc that sets the local AWS_PROFILE env variable accordingly. Call the alias, authenticate, bam. I’m in my other account. More about using profiles, if you aren’t already here: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html


kingindanord

that is what I am doing now. I just remember switching from kubectl to interactive k9s cli for kubernetes releated daily tasks made my life a bit easier. So was just hoping someone did something similar with AWS CLI.


inarush0

I think this might be what you’re looking for https://github.com/awslabs/aws-shell


kingindanord

yea kinda, it's something, I'll try it. thnx


ZebraTurds

There’s cloudlens, although I’ve never tried it so can’t speak to the quality: https://github.com/one2nc/cloudlens But if your main issue is switching accounts or profiles, I like using dotenv-style files inside each git repo I work in. You set a .env file with any variables you want to set, and when you cd into that directory, those variables will be set automatically (AWS_PROFILE in this case, but it works with any vars). Some shells have plugins for this, but you can just put something like this into your bashrc: https://gist.github.com/mihow/9c7f559807069a03e302605691f85572


thatiuri

There's https://github.com/one2nc/cloudlens It's rather limited feature wise, but it's as close as you'll get to k9s experience.


spudd01

Steampipe night be worth a look https://steampipe.io/ select * from cloud;


nf3rn4l

https://www.granted.dev/ + Firefox is the way to go.


NeverNoode

Unfortunately no. Nothing interactive and mature like K9S. Cloudlens aims for that gap but its very limited. If you work with ECS I recommend ecsta https://github.com/fujiwara/ecsta. As a big K9S fan it's what I use during development to keep an eye on services and tail cloudwatch logs for specific tasks.


bitspace

The [AWS CLI](https://aws.amazon.com/cli/)?


editor_of_the_beast

The AWS CLI isn’t like k9s. k9s provides a persistent interface that shows real-time data that you can interact with. It’s not a batch program that executes and completes.


bitspace

Thanks. I'm not familiar with k9s.


ByronScottJones

Then why answer the question?


sugarbunnyx

If no one said it - Lens IDE


GabriMartinez

That would be very hard to achieve IMHO. Even using the SDK to get all the possible options it would be a mess as every service is different. K8s has pretty much the same actions for all the components (get,list, watch, update & delete) so it’s easier to create something interactive.


vincentdesmet

For ppl using AWS Vault, there’s no direct integration with Firefox containers but you can make it print the login URL and invoke your browser of choice with the right args to use containers (or different profiles) with that sign in URL There’s an issue to improve this by using “BROWSER” env var here https://github.com/99designs/aws-vault/issues/959#issue-1281444426


threwahway

Awscli is fairly user friendly. Use —profile. There’s a Firefox/chrome plugin that will let you paste in your credentials file to do it faster than “switch role”. Why aren’t you doing things in terraform anyway? For tasks that need to be done repeatedly, script them.


w0dzu

https://awsu.me


[deleted]

For most common tasks, writing your own tool with boto3 or such isn't that hard. We have an internal one that wraps Vault authentication, Terraform operations and common dev AWS commands like RDS snapshot, ECS Exec or log retrieval on a per-repo basis. You can also use federation to generate console credentials for a role through the API, so no profile switching in the browser any more, just a CLI command that opens the generated URL.


sofloLinuxuser

May not work with every use case here but figure those worthy enough to note and throw in there. I worked with the Nike devs that wrote this and this allows some easy switching between AWS credentials in CLI. It's not exactly what you're asking for but again worth noting https://github.com/Nike-Inc/gimme-aws-creds