Skip to content

Commit 998a560

Browse files
authored
Merge pull request #2 from vnastenko/Add_configuration_section
add configuration section in README for aws-cli v1 and aws-cli v2
2 parents 1045a45 + 259e10d commit 998a560

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The code is based on the following article https://docs.aws.amazon.com/IAM/lates
1414

1515
The goal of this plugin is to simplify the authentication process to AWS Console, by providing a method to login to a given account without leaving the terminal.
1616

17-
# Installation & Usage
17+
# Installation
1818
To install it as a plugin for `awscli` please follow these steps
1919

2020
Install `awscli-console-plugin` using `pip`, use an appropriate artifact for your OS from the release page.
@@ -24,9 +24,33 @@ $ pip install https://github.com/b-b3rn4rd/awscli-console-plugin/releases/downlo
2424
$ pip install https://github.com/b-b3rn4rd/awscli-console-plugin/releases/download/1.1.0/awscli-console-plugin_1.1.0_Windows_x86_64.zip # Windows
2525
```
2626

27-
Modify the `plugins` sections in the `~/.aws/config` file
28-
```bash
27+
28+
# Configuration
29+
30+
Edit your `~/.aws/config` to include the following plugin definition:
31+
32+
If you are using the v1 AWS CLI, you can just add the plugin:
33+
34+
```
35+
[plugins]
36+
console = console
37+
38+
[profile auth]
39+
region=ap-southeast-2
40+
aws_access_key_id=AKIAXXXXXXXXXXX
41+
aws_secret_access_key=XYXYXYYXYXYXYXYXY/ZZZZZZ
42+
[profile dev]
43+
role_arn=arn:aws:iam::1234567890123:role/OrganizationAccountAccessRole
44+
region=ap-southeast-2
45+
source_profile=auth
46+
```
47+
48+
If you are using the v2 AWS CLI, you need to also specify the `cli_legacy_plugin_path`, which should
49+
specify where your `pip` packages are installed.
50+
51+
```
2952
[plugins]
53+
cli_legacy_plugin_path = <path to your python3.7/site-packages>
3054
console = console
3155
3256
[profile auth]
@@ -39,6 +63,8 @@ region=ap-southeast-2
3963
source_profile=auth
4064
```
4165

66+
# Usage
67+
4268
Verify that the plugin is successfully installed
4369
```bash
4470
$ aws console help

0 commit comments

Comments
 (0)