Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

AWS Community Builders  profile imageJakob Ondrey
Jakob Ondrey forAWS Community Builders

Posted on

     

AWS SSO Aliases you need to have

Hey kid.. yeah you.. Are you tired of adding--profile <something> to every CLI command? Stop doing that. You can use these easy aliases to set a "context" for your CLI to use until you clear it or change it really easily.

Make sure you have your~/.aws/config file configured properly for AWS SSO. Then go to your shell's "rc" file (eg..bashrc or.zshrc) and add the following:

Image description

Now you can quickly hop back and forth between different accounts and not type out extra stuff.

Is it not working? Run thatawsclear alias you just made and get rid of that dumb.aws/credentials file. It's almost 2024 and you don't need long lived keys anymore! (at least comment it all out while you test)

Note: Make sure you know what account you are in at all times by getting into the habit running the alias for that account when you aren't sure.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Build On!

Would you like to become an AWS Community Builder? Learn more about the program and apply to join when applications are open next.

More fromAWS Community Builders

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp