DEV Community

Jakob Ondrey for AWS Community Builders

Posted on

6

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 that awsclear 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.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Best Practices for Running  Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK cover image

Best Practices for Running Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK

This post discusses the process of migrating a growing WordPress eShop business to AWS using AWS CDK for an easily scalable, high availability architecture. The detailed structure encompasses several pillars: Compute, Storage, Database, Cache, CDN, DNS, Security, and Backup.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay