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:
- Run this command:
aws configure sso
- Follow the prompts:
- To find the SSO start URL value, open the IAM Identity Center console, view the Dashboard, and find AWS access portal URL.
- Continue to follow the prompts specified
- If you are logged out, run the command:
aws sso login --profile <profile-name-you-created>
- To perform CLI commands:
- append –profile <profile-name-you-created>
- 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!