Skip to content

Commit

Permalink
Merge pull request #29 from trussworks/ee-add-install-instructions
Browse files Browse the repository at this point in the history
Adding installation instructions to readme.md
  • Loading branch information
eeeady authored Mar 10, 2020
2 parents 7c16501 + 1462f25 commit 7a2c4fd
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,31 @@ This script creates a virtual MFA device and rotates access keys for a new AWS u

## Installation

Installation instructions will go here.
For OSX Homebrew:

```sh
$ brew tap trussworks/tap
$ brew install setup-new-aws-user
```

## Usage

The script accepts a number of arguments, either as environment variables or
command-line flags:

Usage:
main [OPTIONS]
Application Options:
--region= The AWS region (default: us-west-2) [$AWS_REGION]
--account-id= The AWS account number [$AWS_ACCOUNT_ID]
--profile= The AWS profile name [$AWS_PROFILE]
--iam-user= The IAM user name
--role= The user role type
--output= The AWS CLI output format (default: json)
Help Options:
-h, --help Show this help message
```
Usage:
main [OPTIONS]
Application Options:
--region= The AWS region (default: us-west-2) [$AWS_REGION]
--account-id= The AWS account number [$AWS_ACCOUNT_ID]
--profile= The AWS profile name [$AWS_PROFILE]
--iam-user= The IAM user name
--role= The user role type
--output= The AWS CLI output format (default: json)
Help Options:
-h, --help Show this help message
```

For the arguments that accept either an environment variable or command-line
flag, the environment variable takes precedence if both are provided due to the
Expand Down Expand Up @@ -73,12 +80,16 @@ use the real AWS account ID.

Example:

go run cmd/main.go --role engineer --iam-user testuser --account-id 123456789012 --profile test-profile-name
```
go run cmd/main.go --role engineer --iam-user testuser --account-id 123456789012 --profile test-profile-name
```

After running the script, try a command to ensure the new profile works as
expected:

Example (include AWS_VAULT_KEYCHAIN_NAME if the environment variable is not
set):

AWS_VAULT_KEYCHAIN_NAME=login aws-vault exec test-profile-name -- aws sts get-caller-identity
```
AWS_VAULT_KEYCHAIN_NAME=login aws-vault exec test-profile-name -- aws sts get-caller-identity
```

0 comments on commit 7a2c4fd

Please sign in to comment.