class Aws::SSOCredentials

An auto-refreshing credential provider that assumes a role via {Aws::SSO::Client#get_role_credentials} using a cached access token. When ‘sso_session` is specified, token refresh logic from {Aws::SSOTokenProvider} will be used to refresh the token if possible. This class does NOT implement the SSO login token flow - tokens must generated separately by running `aws login` from the AWS CLI with the correct profile. The `SSOCredentials` will auto-refresh the AWS credentials from SSO.

# You must first run aws sso login --profile your-sso-profile
sso_credentials = Aws::SSOCredentials.new(
  sso_account_id: '123456789',
  sso_role_name: "role_name",
  sso_region: "us-east-1",
  sso_session: 'my_sso_session'
)
ec2 = Aws::EC2::Client.new(credentials: sso_credentials)

If you omit ‘:client` option, a new {Aws::SSO::Client} object will be constructed with additional options that were provided.

@see Aws::SSO::Client#get_role_credentials @see docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html