Skip to content

ok aws generate

Generate AWS CLI configuration for AWS IAM Identity Center roles

Synopsis

Generate AWS CLI configuration for AWS IAM Identity Center roles.

Profile name template supports the following variables:

  • {{.SessionName}}: The name of the SSO session
  • {{.AccountName}}: The name of the AWS account
  • {{.AccountID}}: The ID of the AWS account
  • {{.RoleName}}: The name of the IAM role

Example:

ok aws generate \
  --sso-start-url "https://my-sso.awsapps.com/start" \
  --sso-region "eu-west-1" \
  --template "ok-{{.AccountName}}-{{.RoleName}}"
ok aws generate [flags]

Options

  -h, --help                   help for generate
      --region string          The default region for generated profiles (defaults to sso-region if not set)
      --session-name string    An optional name of the SSO session (defaults to the AWS IAM Identity Center instance identifier if not set)
      --sso-region string      The region of the AWS IAM Identity Center instance
      --sso-start-url string   The start URL of the AWS IAM Identity Center instance
      --template string        Go string template for generating profile names

See also

  • ok aws - Group of AWS related commands.