Summary

This page explains how to authenticate AWS CLI with Okta SSO. These instructions assume the use of fish shell.

Pre-requisites

Have these tools installed before proceeding:

How to

Configure an IDP account under the alias my-account:

$ saml2aws configure \
    --idp-account my-account \
    --idp-provider Okta \
    --url https://example.okta.com/home/amazon_aws/0a1b2c/000 \
    --username [email protected] \
    --role arn:aws:iam::1234567890:role/my-role \
    --region eu-central-1

The command above will create a new entry in the file ~/.saml2aws. The file should look like this: