awssopilot
v1.5.0
Published
Automates AWS SSO token renewal and generates IAM credentials, supporting multi-profile management
Readme
awssopilot
- :notebook_with_decorative_cover: Description
- :warning: Before running
- :hammer: Installation
- :writing_hand: Usage
- :bookmark_tabs: Options
- :monocle_face: Examples
- :page_with_curl: License
- :heart: Contribution
# Description
awssopilot is a command-line tool that automates AWS SSO login for multiple profiles. It supports various login methods such as email/password, phone call, or app-based verification. Additionally, it integrates with yawsso to configure IAM credentials once the login process is completed.
# Before Running
Ensure that your AWS SSO profiles are configured using aws sso configure and your profiles are configured in a JSON file named awssopilot.config. The format of the configuration file should include the following details:
profiles: An array of AWS SSO profiles to log into.email: The email address associated with the AWS account.password: The password for the AWS account.phone: Last two digits of the phone number for phone call-based authentication.type: The authentication type (callfor phone call orappfor app-based verification).
The awssopilot.config file should be placed as follows:
- Linux/macOS: ~/awssopilot.config
- Windows: %userprofile%\awssopilot.config
# Installation
npm i -g awssopilot
# Usage
Basic usage example:
awssopilot [profile] [profile]...This will automatically attempt to log into all profiles specified in the awssopilot.config file.
# Options
The following command-line options are supported:
| Option | Description | Type | Required | Default value |
|-----------------|---------------------------------------------------------------|---------------|------------|----------------|
| --skip-update | Skip checking for updates | boolean | No | false |
| -v, --version | Show version number | boolean | No | - |
| -h, --help | Display help information | boolean | No | - |
# Examples
Linux: ~/awssopilot.config
Windows: %userprofile%/awssopilot.config
{
"profiles": [
"profile1",
"profile2",
"profile3"
],
"email": "[email protected]",
"password": "password",
"type": "call",
"phone": "last_two_phone_digits"
}App output:
Setting profile: profile1
Loading url: https://device.sso.eu-west-1.amazonaws.com/?user_code=XXXX-XXX
Approving code...
Logging user...
Loading app code...
Awaiting approval of code: 59
Approving access...
Awaiting graceful time...
Executing YAWSSO...
------------------------------------------
SSO profile 'profile1' token renewed
IAM profile 'profile1-iam' configured
------------------------------------------Call output:
Setting profile: profile1
Loading url: https://device.sso.eu-west-1.amazonaws.com/?user_code=XXXX-XXX
Approving code...
Logging user...
Logging with phone call...
Awaiting approval call...
Approving access...
Awaiting graceful time...
Executing YAWSSO...
-----------------------------------------
SSO profile 'profile1' token renewed
IAM profile 'profile1-iam' configured
-----------------------------------------# License
Distributed under the MIT License. See LICENSE for more information.
# Contributing
We welcome contributions to improve the functionality of awssopilot! Here's how you can contribute:
- Fork the project
- Create a new feature branch (
git checkout -b feature/YourFeature) - Make your changes and commit (
git commit -m 'Add feature') - Push to your branch (
git push origin feature/YourFeature) - Open a pull request
Your contributions will be greatly appreciated!
:star: Feel free to contribute :star:
