forked from Netflix/consoleme
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb15ff1
commit 707b625
Showing
5 changed files
with
82 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,47 @@ | ||
# Credential Export | ||
|
||
|
||
Weep can generate a command to export credentials to [environment variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html) in your shell. | ||
|
||
{% hint style="success" %} | ||
Read about [AWS configuration settings and precedence](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-precedence) for information about precedence of credential sources. | ||
{% endhint %} | ||
|
||
Here's a basic call to print out the credential export command: | ||
|
||
```bash | ||
weep export test_account_user | ||
``` | ||
|
||
{% hint style="info" %} | ||
Weep will do its best to detect your shell and generate the correct export command. Bash, Zsh, and Fish are currently supported. | ||
{% endhint %} | ||
|
||
To automatically export the credentials, just modify your command to be evaluated by the shell: | ||
|
||
{% tabs %} | ||
{% tab title="Bash" %} | ||
```bash | ||
eval $(weep export test_account_user) | ||
``` | ||
{% endtab %} | ||
|
||
{% tab title="Zsh" %} | ||
```bash | ||
eval $(weep export test_account_user) | ||
``` | ||
{% endtab %} | ||
|
||
{% tab title="Fish" %} | ||
```bash | ||
|
||
eval (weep export test_account_user) | ||
``` | ||
{% endtab %} | ||
{% endtabs %} | ||
|
||
Then you can verify that the credentials are set in your environment: | ||
|
||
```bash | ||
weep export arn:aws:iam::012345678901:role/coolApp | ||
INFO[0001] Successfully retrieved credentials. Expire: 2018-08-01 15:39:12 -0700 PDT | ||
export AWS_ACCESS_KEY_ID=ASIAS... | ||
env | grep AWS | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters