AWS SSO Login

Configure your ~/.aws/config

[profile profile1]
sso_start_url = https://yourdomain.awsapps.com/start
sso_region = us-west-2
sso_account_id = youraccountid
sso_role_name = AdministratorAccess
region = us-west-2
output = json

Login with SSO interactively:

aws sso login --profile profile1

Login with SSO in a non-interactive session using device code (in a SSH session, etc):

aws sso login --profile profile1 --use-device-code

Tell AWS which profile to use when running commands so you don’t need to add –profile to everything:

export AWS_PROFILE=profile1

See the details of our currnet login session:

aws sts get-caller-identity

Grab EKS Config

aws eks update-kubeconfig --name mycluster --region us-west-2