Skip to content

Commit 4551b3a

Browse files
committed
Cleanup AWS credentials for style and consistency
Signed-off-by: Lynette Miles <lynette.miles@chronosphere.io>
1 parent d335e88 commit 4551b3a

File tree

2 files changed

+39
-23
lines changed

2 files changed

+39
-23
lines changed

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
* [Hot Reload](administration/hot-reload.md)
8080
* [Troubleshooting](administration/troubleshooting.md)
8181
* [Performance Tips](administration/performance.md)
82+
* [AWS credentials](administration/aws-credentials.md)
8283

8384
## Local Testing
8485

administration/aws-credentials.md

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,54 @@
11
# AWS Credentials
22

3-
Plugins that interact with AWS services will fetch credentials from various providers in the following order.
4-
Only the first provider that is able to provide credentials will be used.
3+
Plugins that interact with AWS services fetch credentials from various providers in
4+
the following order. Only the first provider that's able to provide credentials will
5+
be used.
56

6-
All AWS plugins additionally support a `role_arn` (or `AWS_ROLE_ARN`, for [Elasticsearch](../pipeline/outputs/elasticsearch.md)) configuration parameter. If specified, the fetched credentials will then be used to assume the given role.
7+
- [Environment variables](#environment-variables)
8+
- [Shared configuration and credentials files](#shared-configuration-and-credentials-files)
9+
- [EKS Web Identity Token (OIDC)](#eks-web-identity-token-oidc)
10+
- [ECS HTTP credentials endpoint](#ecs-http-credentials-endpoint)
11+
- [EC2 Instance Profile Credentials (IMDS)](#ec2-instance-profile-credentials-imds)
712

8-
## 1. Environment Variables
13+
All AWS plugins additionally support a `role_arn` (or `AWS_ROLE_ARN`, for
14+
[Elasticsearch](../pipeline/outputs/elasticsearch.md)) configuration parameter. If
15+
specified, the fetched credentials will then be used to assume the given role.
916

10-
Uses the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` (and optionally `AWS_SESSION_TOKEN`) environment variables if set.
17+
## Environment variables
1118

12-
## 2. Shared Configuration and Credentials Files
19+
Plugins use the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` (and optionally
20+
`AWS_SESSION_TOKEN`) environment variables if set.
1321

14-
Reads the shared config file at `$AWS_CONFIG_FILE` (or `$HOME/.aws/config`) and the shared credentials file at `$AWS_SHARED_CREDENTIALS_FILE` (or `$HOME/.aws/credentials`) to fetch the credentials for the profile named `$AWS_PROFILE` or `$AWS_DEFAULT_PROFILE` (or "default"). See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html.
22+
## Shared configuration and credentials files
1523

16-
The shared settings will be evaluated in the following order.
24+
Plugins read the shared `config` file at `$AWS_CONFIG_FILE` (or `$HOME/.aws/config`),
25+
and the shared credentials file at `$AWS_SHARED_CREDENTIALS_FILE` (or
26+
`$HOME/.aws/credentials`) to fetch the credentials for the profile named
27+
`$AWS_PROFILE` or `$AWS_DEFAULT_PROFILE` (or "default"). See
28+
[Configuration and credential file settings in the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html).
1729

18-
Setting|File|Description
19-
---|---|---
20-
`credential_process`|config| See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html.<br/>Supported on Linux only.
21-
`aws_access_key_id`<br/>`aws_secret_access_key`<br/>*`aws_session_token`*|credentials|Access key ID and secret key to use to authenticate.<br/>The session token must be set for temporary credentials.
30+
The shared settings evaluate in the following order:
2231

23-
At this time, no other settings are supported.
32+
| Setting | File | Description |
33+
|---|---|---|
34+
| `credential_process` | `config` | Linux only. See [Sourcing credentials with an external process in the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html). |
35+
| `aws_access_key_id`<br />`aws_secret_access_key`<br />`aws_session_token` | `credentials` | Access key ID and secret key to use to authenticate. The session token must be set for temporary credentials. |
2436

25-
## 3. EKS Web Identity Token (OIDC)
37+
No other settings are supported.
2638

27-
Fetches credentials via a signed web identity token for a Kubernetes service account.
28-
See https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html.
39+
## EKS Web Identity Token (OIDC)
2940

30-
## 4. ECS HTTP Credentials Endpoint
41+
Credentials are fetched using a signed web identity token for a Kubernetes service account.
42+
See [IAM roles for service accounts](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html).
3143

32-
Fetches credentials for the ECS task's role.
33-
See https://docs.aws.amazon.com/AmazonECS/latest/userguide/task-iam-roles.html.
44+
## ECS HTTP credentials endpoint
3445

35-
## 5. EC2 Instance Profile Credentials (IMDS)
46+
Credentials are fetched for the ECS task's role. See
47+
[Amazon ECS task IAM role](https://docs.aws.amazon.com/AmazonECS/latest/userguide/task-iam-roles.html).
3648

37-
Fetches credentials for the EC2 instance profile's role.
38-
See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html.
39-
As of Fluent Bit version 1.8.8, IMDSv2 is used by default and IMDSv1 may be disabled. Prior versions of Fluent Bit require enabling IMDSv1 on EC2.
49+
## EC2 instance profile credentials (IMDS)
50+
51+
Fetches credentials for the EC2 instance profile's role. See
52+
[IAM roles for Amazon EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html).
53+
As of Fluent Bit version 1.8.8, IMDSv2 is used by default and IMDSv1 might be disabled.
54+
Prior versions of Fluent Bit require enabling IMDSv1 on EC2.

0 commit comments

Comments
 (0)