Skip to content

Commit 114f75d

Browse files
committed
Updated README.md
1 parent 0064968 commit 114f75d

File tree

1 file changed

+8
-27
lines changed

1 file changed

+8
-27
lines changed

README.md

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@
77

88
## About
99

10-
Knox is a powerful utility designed to simplify and streamline the process of managing AWS credentials. Whether you're frequently switching between different AWS profiles or managing credentials issuance in an SSO environment, Knox provides a straightforward CLI tool to handle these tasks effortlessly. Commands like `knox select`, `knox last-used`, and `knox clean` make it easy to navigate and manipulate your AWS credential configurations. Its configurable nature, showcased in the `~/.aws/config` setup recommendations, ensures seamless integration into your AWS workflows. Whether you're in development, staging, or production, Knox helps maintain efficient and secure AWS credential management.
10+
**Knox** is a powerful utility designed to simplify and streamline the management of AWS credentials. Whether you're frequently switching between different AWS profiles or handling credential issuance in an SSO environment, Knox provides a straightforward CLI tool to manage these tasks effortlessly.
1111

12-
Additionally the `knox connect` command provides a simple way to start an SSM session with an EC2 instance. This feature is particularly useful for users who frequently SSH into EC2 instances using SSM Session Manager. Knox allows you to switch between different AWS profiles and start an interactive session with a specific instance using a single command.
12+
Key features include:
13+
14+
- **Profile Management:** Commands like `knox select`, `knox last-used`, and `knox clean` make it easy to navigate and manipulate your AWS credentials.
15+
- **Seamless Configuration Handling:** Knox reads your `~/.aws/config` file to get configured SSO sessions and saves used role credentials into `~/.aws/knox` for future use.
16+
- **SSM Session Management:** The `knox connect` command simplifies the process of starting an SSM session with an EC2 instance. This feature is particularly useful for users who frequently SSH into EC2 instances using SSM Session Manager. With Knox, you can easily switch between different AWS profiles and start an interactive session with a specific instance using a single command.
17+
18+
Knox helps maintain efficient and secure AWS credential management, making it an invaluable tool for your development, staging, and production environments.
1319

1420
## Install
1521

@@ -115,11 +121,6 @@ region = us-east-1
115121
output = json
116122
credential_process = knox creds last-used
117123

118-
[profile pick]
119-
region = us-east-1
120-
output = json
121-
credential_process = knox select
122-
123124
[sso-session development-sso]
124125
sso_region = us-east-1
125126
sso_registration_scopes = sso:account:access
@@ -135,23 +136,3 @@ sso_region = us-east-1
135136
sso_registration_scopes = sso:account:access
136137
sso_start_url = https://d-0000000000.awsapps.com/start
137138
```
138-
139-
## Example
140-
141-
Here is another use-case where this tool can come in handy. If you use SSM Session Manager to SSH into your EC2 instances, you can use knox to switch between different AWS profiles and start an interactive session with a specific instance. Here is an example of how you can achieve this:
142-
143-
```shell
144-
function ssh-aws () {
145-
if [[ $# -ne 1 ]]; then
146-
echo "Usage: ssh-aws <instance-id>"
147-
return 1
148-
fi
149-
aws --profile pick ssm start-session --target $1 --document-name AWS-StartInteractiveCommand --parameters command="sudo su - \`id -un 9001\`"
150-
}
151-
```
152-
153-
Now you can SSH into an EC2 instance using the following command:
154-
155-
```
156-
$ ssh-aws i-00000000000000000
157-
```

0 commit comments

Comments
 (0)