How to Configure AWS SSO CLI Access

How to Configure AWS SSO CLI Access

AWS Single Sign On (SSO) is where users can connect centrally and access multiple AWS accounts and applications through one set of credentials.

AWS SSO can now be found under IAM Identity Center. SSO access can be used to access console resources and services, but can also be used within the CLI to access AWS programatically. Some prerequisites that are needed to set up AWS SSO CLI Access are:

  • An AWS account with permissions to create an AWS SSO instance and roles
  • AWS CLI installed and configured

An SSO instance first needs to be created.

To authenticate with AWS SSO through the CLI perform the following steps:

  1. Run this command: aws configure sso
  2. Follow the prompts:
    1. To find the SSO start URL value, open the IAM Identity Center console, view the Dashboard, and find AWS access portal URL.
  3. Continue to follow the prompts specified
  4. If you are logged out, run the command: aws sso login --profile <profile-name-you-created>
  5. To perform CLI commands:
    1. append –profile <profile-name-you-created>
    2. For more persistent access run: export AWS_PROFILE=<profile-name-you-created>

Interested in more AWS related services? Check out this article on a full guide to your AWS VPC!

Share This Post

Subscribe To Our Newsletter

Get updates and learn from the best

More To Explore

Do You Want To Take on the cloud?

drop us a line and keep in touch