Configuration: credentials
March 3, 2026 ยท View on GitHub
Both S3 input/output plugin provide several credential methods for authentication/authorization.
AWS key and secret authentication
These parameters are required when your agent is not running on EC2 instance with an IAM Role. When using an IAM role, make sure to configure instance_profile_credentials. Usage can be found below.
aws_key_id
AWS access key id.
aws_sec_key
AWS secret key.
aws_profile
Specify a named profile from your shared AWS configuration files (~/.aws/credentials or ~/.aws/config).
This is useful for environments using IAM Roles or short-lived credentials.
aws_credential_process
Specify a credential_process command directly in the Fluentd configuration.
This enables integration with external credential helpers like IAM Roles Anywhere.
<match *>
@type s3
# Example for IAM Roles Anywhere
aws_credential_process "/path/to/aws_signing_helper credential-process --certificate /path/to/cert.pem --private-key /path/to/key.pem --trust-anchor-arn <ARN> --profile-arn <ARN> --role-arn <ARN>"
# ... other settings
</match>
<assume_role_credentials> section
Typically, you use AssumeRole for cross-account access or federation.
<match *>
@type s3
<assume_role_credentials>
role_arn ROLE_ARN
role_session_name ROLE_SESSION_NAME
</assume_role_credentials>
</match>
See also:
role_arn (required)
The Amazon Resource Name (ARN) of the role to assume.
role_session_name (required)
An identifier for the assumed role session.
policy
An IAM policy in JSON format.
duration_seconds
The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) to 3600 seconds (1 hour). By default, the value is set to 3600 seconds.
external_id
A unique identifier that is used by third parties when assuming roles in their customers' accounts.
<web_identity_credentials> section
Similar to the assume_role_credentials, but for usage in EKS.
<match *>
@type s3
<web_identity_credentials>
role_arn ROLE_ARN
role_session_name ROLE_SESSION_NAME
web_identity_token_file AWS_WEB_IDENTITY_TOKEN_FILE
</web_identity_credentials>
</match>
See also:
- Using IAM Roles - AWS Identity and Access Management
- IAM Roles For Service Accounts
- Aws::STS::Client
- Aws::AssumeRoleWebIdentityCredentials
role_arn (required)
The Amazon Resource Name (ARN) of the role to assume.
role_session_name (required)
An identifier for the assumed role session.
web_identity_token_file (required)
The absolute path to the file on disk containing the OIDC token
policy
An IAM policy in JSON format.
duration_seconds
The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) to 43200 seconds (12 hours). By default, the value is set to 3600 seconds.
<instance_profile_credentials> section
Retrieve temporary security credentials via HTTP request. This is useful on EC2 instance.
<match *>
@type s3
<instance_profile_credentials>
ip_address IP_ADDRESS
port PORT
</instance_profile_credentials>
</match>
See also:
- Aws::InstanceProfileCredentials
- Temporary Security Credentials - AWS Identity and Access Management
- Instance Metadata and User Data - Amazon Elastic Compute Cloud
retries
Number of times to retry when retrieving credentials. Default is nil.
ip_address
Default is 169.254.169.254.
port
Default is 80.
http_open_timeout
Default is 5.
http_read_timeout
Default is 5.
<shared_credentials> section
This loads AWS access credentials from local ini file. This is useful for local developing.
<match *>
@type s3
<shared_credentials>
path PATH
profile_name PROFILE_NAME
</shared_credentials>
</match>
See also:
path
Path to the shared file. Defaults to "#{Dir.home}/.aws/credentials".
profile_name
Defaults to 'default' or [ENV]('AWS_PROFILE').