Skip to content

advantageous/AWS-SSO-Profile-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS SSO Profile Manager (aws-sso-profile)

A CLI tool to automatically create and update AWS CLI profiles for every IAM role granted to your AWS SSO user.
It supports importing session definitions from YAML, generating AWS CLI config profiles, and dry-running changes.

Features

  • Bulk profile creation from AWS SSO sessions
  • Import sessions from a YAML file
  • Dry-run mode to preview changes
  • Force overwrite of existing sessions and profiles
  • Non-interactive mode for scripts and automation

Installation

Homebrew (Recommended)

brew tap advantageous/tap
brew install aws-sso-profile

To upgrade later:

brew upgrade aws-sso-profile

Usage

aws-sso-profile configure  #Configure your sso session
aws-sso-profile generate   #Perform sso login and generate all profiles

Common Options

Option Description
--import-file <path> Path to YAML file containing SSO session definitions
--dry-run Preview what changes would be made without applying them
--non-interactive Run without prompting the user
--force Overwrite existing sessions/profiles without confirmation
--config-file <path> Custom path for sessions.yaml store
--output-file <path> Custom AWS CLI config output path

Example Session YAML

Advantageous:
  start_url: https://advantageous.awsapps.com/start
  sso_region: eu-central-1

OtherCompany:
  start_url: https://d-1234567890.awsapps.com/start
  sso_region: us-east-1

Examples

Import all sessions from a file

aws-sso-profile configure --import-file ./sessions.yaml

Generate all sessions to you AWS config

aws-sso-profile generate

Preview changes without applying

aws-sso-profile configure --import-file ./sessions.yaml --dry-run

Force overwrite profiles

aws-sso-profile configure --import-file ./sessions.yaml --force

License

MIT License – See LICENSE for details.

About

Script to automatically create profiles for every IAM role that is granted to an SSO user.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages