..

docs/content/cmds/aws-sso_login.md## aws-sso login

Retrieve short-lived credentials via AWS SSO & SSOOIDC

Synopsis

Creates and returns an access token for the authorized client. The access token issued will be used to fetch short-term credentials for the assigned roles in the AWS account.

If the account has an EKS cluster, authenticates with the cluster and logs you into you ECR in your account. EKS and ECR auth can be disabled with configuration updates.

aws-sso login [flags]

Examples

  aws-sso login env1

Options

  -c, --cluster string    The cluster you would like to target when logging in
      --disableEKSLogin   Disables automatic detection and login for EKS
  -h, --help              help for login
  -o, --output string     The output format for sso (default "json")
  -p, --private           Open a private browser when gathering/refreshing token
      --refresh           Whether to manually refresh your local authentication token
  -r, --region string     The region you would like to use at login
      --role string       The IAM role to use when logging in
      --skipDefaults      Skip the default login values and use prompt selection
  -t, --token string      The token to use when logging in. To be used when managing multiple session tokens at once (shorthand '-' for default token)
  -u, --url string        The AWS SSO start url

Options inherited from parent commands

      --as string               Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
      --as-group stringArray    Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
      --commandTimeout string   timeout for network commands executed (default "1m")
      --config string           Configuration file to use during execution (default "/Users/louislef299")
      --debug                   add debug message headers to logger

SEE ALSO

Auto generated by spf13/cobra on 19-Nov-2025