DEV Community

Cover image for AWS SSO...CLI...Go !!
VijayaNirmalaGopal for AWS Community Builders

Posted on • Edited on

AWS SSO...CLI...Go !!

Recently, I have been given AWS SSO Access for my teams' AWS Accounts. Obviously, I was in need of running & checking output of aws cli commands; I was looking around for role(s) to assume, if not keys.

Well, it did strike a bit late, but nonetheless, I had SSO for aws cli. So let us begin & see how I configured cli profile with my SSO in few steps

AWS SSO
AWS Service that enables creation of users for AWS accounts/services from SSO Service or brought in from Active Directory or any identity provider.

AWS CLI
Command Line Interface to run/execute commands against any AWS Service and view, use and analyze the output in command line. This can also be made as a script and be automated for repeated tasks

Pre-requisite:

  1. I have Windows 10 laptop
  2. Had installed AWS CLI 2

Steps to configure and connect to my AWS Account via SSO

  1. Open command line check the aws cli version Image description
  2. Configure sso as below
  3. Type in the SSO URL that gets assigned & shared with you for browser access
  4. Enter the needed region Image description
  5. Enter the given code in the browser URL that opens up
  6. Authorize the prompt Image description
  7. See the successful validation of your sso login Image description
  8. Set the default output format, profile name Image description
  9. Thus a new SSO Profile has been created and now start using cli commands using this profile or any other profile with different region, format as needed

Happy CLI via SSO

Top comments (0)