-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(README) Markdown linting #11
Open
virgilwashere
wants to merge
1
commit into
cytopia:master
Choose a base branch
from
virgilwashere:readme
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,18 +1,21 @@ | ||
# aws-export-profile | ||
|
||
`aws-export-profile` is a bash script that will output AWS export statements of your chosen aws boto profile. In case you have to manage multiple AWS accounts that rely on different boto profiles, you can *activate* a chosen profile by making it available in your shell environment. | ||
`aws-export-profile` is a bash script that will output AWS export statements of your chosen aws boto profile. In case you have to manage multiple AWS accounts that rely on different boto profiles, you can **_activate_** a chosen profile by making it available in your shell environment. | ||
|
||
This tool reads credentials from `~/.aws/credentials`. If you are looking for a way to export boto profiles via `aws sts assume-role` instead, have a lookt at **[aws-export-assume-profile](https://github.com/cytopia/aws-export-assume-profile)**. | ||
This tool reads credentials from `~/.aws/credentials`. If you are looking for a way to export boto profiles via `aws sts assume-role` instead, have a look at **[aws-export-assume-profile](https://github.com/cytopia/aws-export-assume-profile)**. | ||
|
||
[![Build Status](https://travis-ci.org/cytopia/aws-export-profile.svg?branch=master)](https://travis-ci.org/cytopia/aws-export-profile) | ||
![Release](https://img.shields.io/github/release/cytopia/aws-export-profile.svg) | ||
|
||
**Note:** Wrap the command in **`$(aws-export-profile)`** to actually export your boto environment variables. | ||
|
||
> [!NOTE] | ||
> Wrap the command in **`$(aws-export-profile)`** to actually export your boto environment variables. | ||
|
||
<!-- markdownlint-disable MD026 --> | ||
## But why? | ||
<!-- markdownlint-enable MD026 --> | ||
|
||
Most AWS related tools support boto profiles out of the box, such as the `aws-cli` (Example: `aws ec2 --profile <BOTO_PROFILE`). However sometimes it is required to have your chosen boto profile available as shell variables. One of the use cases is when you use Docker and want a specific boto login available inside your container.: | ||
|
||
```bash | ||
# Export staging boto profile | ||
user> $(aws-export-profile staging) | ||
|
@@ -25,7 +28,6 @@ user> docker run --rm -it \ | |
my-aws-docker | ||
``` | ||
|
||
|
||
## Available exports | ||
|
||
The following export variables are currently supported. | ||
|
@@ -41,8 +43,7 @@ The following export variables are currently supported. | |
| `AWS_SECURITY_TOKEN` | Secret token | | ||
| `AWS_REGION` | Region| | ||
|
||
|
||
## Examples | ||
### Examples | ||
|
||
This tool simply output the exports to stdout. In order to auto-source them, wrap the command in **`$(...)`**. | ||
|
||
|
@@ -71,6 +72,7 @@ export AWS_REGION="eu-central-1" | |
``` | ||
|
||
#### Boto profile `production` with more exports | ||
|
||
```bash | ||
user> aws-export-profile production | ||
|
||
|
@@ -84,11 +86,12 @@ export AWS_REGION="eu-central-1" | |
``` | ||
|
||
#### Export boto profile `production` | ||
|
||
```bash | ||
user> $(aws-export-profile production) | ||
|
||
# Validate | ||
user> env | grep AWS_ | ||
user> printenv | grep AWS_ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I used |
||
|
||
AWS_ACCESS_KEY_ID="XXXXXXXXXXXXXXXXXXXX" | ||
AWS_ACCESS_KEY="XXXXXXXXXXXXXXXXXXXX" | ||
|
@@ -100,18 +103,18 @@ AWS_REGION="eu-central-1" | |
``` | ||
|
||
#### Unset all AWS_ variables | ||
|
||
```bash | ||
user> $(aws-export-profile -u) | ||
``` | ||
|
||
|
||
## Usage | ||
|
||
```bash | ||
Usage: aws-export-profile [profile] [credentials] [config] | ||
aws-export-profile --unset, -u | ||
aws-export-profile --help|-h | ||
aws-export-profile --version|-v | ||
aws-export-profile --help, -h | ||
aws-export-profile --version, -v | ||
|
||
This bash helper will output AWS export statements of your chosen aws boto profile. | ||
Wrap this script in $(aws-export-profile) to export those environment variables. | ||
|
@@ -126,7 +129,7 @@ Optional parameter: | |
|
||
Arguments: | ||
--unset, -u Unset currently set AWS variables from env | ||
--help, -h Show this help screen | ||
--help, -h Show this help screen | ||
--version, -v Show version | ||
|
||
Available exports: | ||
|
@@ -148,7 +151,7 @@ Examples to export: | |
$(aws-export-profile production /jenkins/aws/credentials /jenkins/aws/config) | ||
|
||
Examples to unset all AWS variables | ||
\$(aws-export-profile -u) | ||
$(aws-export-profile -u) | ||
``` | ||
|
||
## License | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
[!NOTE]
is not rendered by GitHub flavored markdown