Subscribe For Updates
AWS CLI with ADFS
If your organization uses Active Directory Federation Services (ADFS), you can use this very useful tool to authenticate with the cli
- prereqs: python and pip installed, also aws cli tool
Generate credentials to work with aws-cli
- Download tool at this link
- Run following command:
aws-adfs login --no-sspi --adfs-host aws-sso.<company>.com --profile default
- fill out username and password like you would on the UI on initial use of tool
View Generated AWS Credentials
- View creds with
<vi | code | vim | nano> ~/.aws
, check credentials folder - Your credentials will be like so:
[default]
aws_access_key_id = blah
aws_secret_access_key = blah
aws_session_token = long blah
aws_security_token = long blah
- Configure CLI with new credentials
Use with CLI:
aws configure
- answer prompts:
AWS Access Key ID [*******]:
AWS Secret Access Key [*******]:
Default region name [<region>: <enter region>]
Default output format [json]: