mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
feat: aws config files examples
This commit is contained in:
33
examples/dotfiles/.aws/config
Normal file
33
examples/dotfiles/.aws/config
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html
|
||||||
|
|
||||||
|
[default]
|
||||||
|
region = us-west-1
|
||||||
|
output = json
|
||||||
|
|
||||||
|
[profile private]
|
||||||
|
output = yaml-stream
|
||||||
|
role_arn=arn:aws:iam::777788889999:role/user1role
|
||||||
|
source_profile=default
|
||||||
|
role_session_name=session_user1
|
||||||
|
region=us-east-1
|
||||||
|
cli_auto_prompt = on-partial
|
||||||
|
|
||||||
|
[profile random-name]
|
||||||
|
sso_session = my-sso
|
||||||
|
sso_account_id = 111122223333
|
||||||
|
sso_role_name = readOnly
|
||||||
|
region = us-west-2
|
||||||
|
output = text
|
||||||
|
|
||||||
|
[profile work]
|
||||||
|
sso_session = my-sso
|
||||||
|
sso_account_id = 444455556666
|
||||||
|
sso_role_name = readOnly
|
||||||
|
region = us-east-1
|
||||||
|
output = json
|
||||||
|
cli_auto_prompt = on
|
||||||
|
|
||||||
|
[sso-session my-sso]
|
||||||
|
sso_region = us-east-1
|
||||||
|
sso_start_url = https://my-sso-portal.awsapps.com/start
|
||||||
|
sso_registration_scopes = sso:account:access
|
||||||
13
examples/dotfiles/.aws/credentials
Normal file
13
examples/dotfiles/.aws/credentials
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html
|
||||||
|
|
||||||
|
[default]
|
||||||
|
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
|
||||||
|
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
||||||
|
aws_session_token = IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZVERYLONGSTRINGEXAMPLE
|
||||||
|
|
||||||
|
# Use the same name of the profile
|
||||||
|
# Do not use the word profile in the section
|
||||||
|
[private]
|
||||||
|
aws_access_key_id=AKIAI44QH8DHBEXAMPLE
|
||||||
|
aws_secret_access_key=je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY
|
||||||
|
aws_session_token = fcZib3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZVERYLONGSTRINGEXAMPLE
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
1. [TL;DR](#tldr)
|
1. [TL;DR](#tldr)
|
||||||
1. [Profiles](#profiles)
|
1. [Profiles](#profiles)
|
||||||
|
1. [Configuration](#configuration)
|
||||||
1. [Further readings](#further-readings)
|
1. [Further readings](#further-readings)
|
||||||
1. [Sources](#sources)
|
1. [Sources](#sources)
|
||||||
|
|
||||||
@@ -74,6 +75,15 @@ Default output format [None]: json
|
|||||||
$ export AWS_PROFILE="work"
|
$ export AWS_PROFILE="work"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
| File | Description |
|
||||||
|
| -------------------- | ------------- |
|
||||||
|
| `~/.aws/config` | Configuration |
|
||||||
|
| `~/.aws/credentials` | Credentials |
|
||||||
|
|
||||||
|
See [CLI config files] for examples.
|
||||||
|
|
||||||
## Further readings
|
## Further readings
|
||||||
|
|
||||||
- [AWS]
|
- [AWS]
|
||||||
@@ -93,6 +103,9 @@ $ export AWS_PROFILE="work"
|
|||||||
[ecr tldr]: ecr.md#tldr
|
[ecr tldr]: ecr.md#tldr
|
||||||
[s3 tldr]: s3.md#tldr
|
[s3 tldr]: s3.md#tldr
|
||||||
|
|
||||||
|
<!-- Files -->
|
||||||
|
[cli config files]: ../../../examples/dotfiles/.aws
|
||||||
|
|
||||||
<!-- Upstream -->
|
<!-- Upstream -->
|
||||||
[quickstart]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html
|
[quickstart]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html
|
||||||
[configure profiles]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html
|
[configure profiles]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html
|
||||||
|
|||||||
Reference in New Issue
Block a user