Skip to content

Commit

Permalink
Merge pull request #2 from vnastenko/Add_configuration_section
Browse files Browse the repository at this point in the history
add configuration section in README for aws-cli v1 and aws-cli v2
  • Loading branch information
b-b3rn4rd authored Apr 10, 2023
2 parents 1045a45 + 259e10d commit 998a560
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The code is based on the following article https://docs.aws.amazon.com/IAM/lates

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.

# Installation & Usage
# Installation
To install it as a plugin for `awscli` please follow these steps

Install `awscli-console-plugin` using `pip`, use an appropriate artifact for your OS from the release page.
Expand All @@ -24,9 +24,33 @@ $ pip install https://github.com/b-b3rn4rd/awscli-console-plugin/releases/downlo
$ 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
```

Modify the `plugins` sections in the `~/.aws/config` file
```bash

# Configuration

Edit your `~/.aws/config` to include the following plugin definition:

If you are using the v1 AWS CLI, you can just add the plugin:

```
[plugins]
console = console
[profile auth]
region=ap-southeast-2
aws_access_key_id=AKIAXXXXXXXXXXX
aws_secret_access_key=XYXYXYYXYXYXYXYXY/ZZZZZZ
[profile dev]
role_arn=arn:aws:iam::1234567890123:role/OrganizationAccountAccessRole
region=ap-southeast-2
source_profile=auth
```

If you are using the v2 AWS CLI, you need to also specify the `cli_legacy_plugin_path`, which should
specify where your `pip` packages are installed.

```
[plugins]
cli_legacy_plugin_path = <path to your python3.7/site-packages>
console = console
[profile auth]
Expand All @@ -39,6 +63,8 @@ region=ap-southeast-2
source_profile=auth
```

# Usage

Verify that the plugin is successfully installed
```bash
$ aws console help
Expand Down

0 comments on commit 998a560

Please sign in to comment.