|
1 | 1 | # AWS Credentials
|
2 | 2 |
|
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. |
5 | 6 |
|
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) |
7 | 12 |
|
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. |
9 | 16 |
|
10 |
| -Uses the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` (and optionally `AWS_SESSION_TOKEN`) environment variables if set. |
| 17 | +## Environment variables |
11 | 18 |
|
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. |
13 | 21 |
|
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 |
15 | 23 |
|
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). |
17 | 29 |
|
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: |
22 | 31 |
|
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. | |
24 | 36 |
|
25 |
| -## 3. EKS Web Identity Token (OIDC) |
| 37 | +No other settings are supported. |
26 | 38 |
|
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) |
29 | 40 |
|
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). |
31 | 43 |
|
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 |
34 | 45 |
|
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). |
36 | 48 |
|
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