Skip to content
This repository was archived by the owner on Jan 27, 2025. It is now read-only.

Commit 4cd1001

Browse files
EricZaporzaniansu
andauthored
Adding commands for assumed role account switching (#19)
* Implementing a way to add new assume-role profiles * Polishing things up, add a delete assume role profile command, * Fixing some ordering in the command list * Update README, CHANGELOG * Fixing an issue with profiles containing one or more spaces * Fix logging on successful profile switch * Add flag to make certain clients read from the config file * Fix some naming, making the parentProfile option a list when you're adding an assume-role-profile * Changes to make adding an assumed role less error-prone Take default region and output format from parent profile by default. Don't allow creation if a profile of the same name already exists * Using more reliable method for iteration, alter root profile option * Bump version in package.json, update date on changelog * Fix update check Co-authored-by: Ian Sutherland <ian@iansutherland.ca>
1 parent db17e7a commit 4cd1001

File tree

8 files changed

+359
-66
lines changed

8 files changed

+359
-66
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ build
22
dist
33
node_modules
44

5+
.idea
6+
57
*.log

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.1.0 (April 2, 2020)
4+
5+
Adding and augmenting commands to enable assumed role adoption
6+
37
## 1.0.1 (January 26, 2020)
48

59
Move all dependencies to devDependencies

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ yarn global upgrade awsx --latest
3838

3939
### Switching profiles
4040

41-
#### `awsx` or `awsx [profile]`
41+
#### `awsx` or `awsx [profile]` or `awsx [profile] [assume-role-profile]`
4242

43-
If you don't specify a profile name you will be prompted to choose from one of your existing profiles. If the selected profile has MFA enabled and you want to force a new MFA login use the `--force-mfa` flag.
43+
If you don't specify a profile name (or an assume role profile name, if applicable) you will be prompted to choose from one of your existing profiles. If the selected profile has MFA enabled and you want to force a new MFA login use the `--force-mfa` flag.
4444

4545
### Adding a new profile
4646

@@ -66,6 +66,14 @@ If you don't have MFA set up on your AWS account you can enable it by following
6666

6767
#### `awsx remove-profile [profile]`
6868

69+
### Adding an assume role profile
70+
71+
#### `awsx add-assume-role-profile [profile] [parent-profile] [role-arn] [default-region] [output-format]`
72+
73+
### Removing an assume role profile
74+
75+
#### `awsx remove-assume-role-profile [profile]`
76+
6977
## Contributing
7078

7179
If you'd like to contribute to awsx we recommend that you first [open an issue](https://github.com/neofinancial/awsx/issues) to discuss your proposed change.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "awsx",
33
"description": "AWS CLI profile switcher with MFA support",
4-
"version": "1.0.1",
4+
"version": "1.1.0",
55
"author": "Neo Financial Engineering <engineering@neofinancial.com>",
66
"license": "MIT",
77
"repository": {

0 commit comments

Comments
 (0)