A lightweight AWS SSO (Single Sign-On) authentication manager that automates credential management for AWS CLI and kubectl.
- No manual logins: Eliminates the need to run
aws sso loginrepeatedly - Custom browser support: On macOS, use your preferred browser instead of the default
- EKS integration: Generate authentication tokens for Amazon EKS clusters
- Automatic refresh: Credentials are cached and refreshed automatically
- Audit logging: All actions are logged to
~/.aws/ssologinlite/logs/
Create a configuration file at ~/.config/ssologinlite.toml:
browser = "firefox"
default_sso_url = "https://myawsorg.awsapps.com/start/"Options:
browser: Browser to use for SSO login (e.g., "firefox", "chrome", "safari")default_sso_url: Your organization's AWS SSO start URL
- AWS SSO Profile Management: Automatically configure and manage SSO profiles
- Assume Role Support: Seamlessly handle role assumption across accounts
- EKS Authentication: Generate kubectl-compatible authentication tokens
- Credential Caching: Reduce authentication overhead with intelligent caching
- Shell Integration: Starship prompt integration for credential expiration warnings
curl -LO https://github.com/rowkilian/ssologinlite/releases/download/v0.3.5/ssologinlite.zip
unzip ssologinlite.zip
mv ssologinlite /usr/local/bin
chmod +x /usr/local/bin/ssologinlitegit clone https://github.com/rowkilian/ssologinlite.git
cd ssologinlite
cargo install --path .Configure your AWS SSO profiles to use ssologinlite:
ssologinlite setupThis command:
- Backs up your existing
~/.aws/configfile - Configures profiles to use ssologinlite as the credential process
Your ~/.aws/config will be updated to look like:
[default]
credential_process = /path/to/ssologinlite token --profile default
output = jsonRetrieve authentication tokens for a specific profile:
ssologinlite token <profile_name>The credentials are cached and automatically refreshed when needed.
Generate authentication tokens for Amazon EKS clusters:
ssologinlite eks --profile <profile_name> --cluster <cluster_name> --region <aws_region>Example:
ssologinlite eks --profile production --cluster my-eks-cluster --region us-west-2This generates a kubectl-compatible authentication token. Configure kubectl to use it:
# ~/.kube/config
users:
- name: my-eks-cluster
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
command: ssologinlite
args:
- eks
- --profile
- production
- --cluster
- my-eks-cluster
- --region
- us-west-2Enable detailed logging for troubleshooting:
ssologinlite --debug token <profile_name>Show SSO credential expiration status in your shell prompt by adding to ~/.config/starship.toml:
[custom.sso_expiration]
when = '''ssologinlite sso-expires-soon'''
command = '''ssologinlite sso-expiration'''
format = '[\[$output\]]($style) '
style = 'bold red'This displays a warning when your SSO credentials are about to expire.
- AWS SSO must be configured in your organization
- Valid AWS SSO permissions for the profiles you want to use
- For EKS: Appropriate IAM permissions to access EKS clusters
ssologinlite integrates with AWS CLI's credential_process mechanism:
- When you run an AWS CLI command, it calls
ssologinlite token - ssologinlite checks for cached, valid credentials
- If needed, it initiates SSO login via your browser
- Fresh credentials are cached for future use
- The credentials are returned to AWS CLI in the expected JSON format
For EKS, it generates pre-signed STS URLs following the AWS authentication protocol, compatible with kubectl's exec credential plugin system.
See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request.