Skip to main content

AWS S3

Overview

AWS S3 uploads log batches to an S3 bucket.

Supported types: Logs · Metrics · Traces

Authentication Configuration

AWS S3 supports AWS access-key, assume-role, and IMDS credentials.

ParameterTypeRequiredDescription
credential_typeoptiontrueaws for access keys or assume role; awsimds for EC2 metadata credentials.
auth_methodoptionfalseUse access_keys or iam_role for aws credentials.
access_key_idstringfalseAWS access key. Required for access_keys; optional source creds for role.
secret_access_keystringfalseAWS secret key. Required for access_keys; optional source creds for role.
session_tokenstringfalseSession token for temporary credentials.
role_arnstringfalseIAM role ARN to assume when auth_method is iam_role.
role_session_namestringfalseOptional session name for the assumed role.
profilestringfalseOptional AWS shared config profile.
imds_endpointstringfalseOptional IMDS endpoint for awsimds credentials.

Note: The Credential Type field is required if not using default AWS credentials.

Configuration

ParameterTypeDefault ValueRequiredDescription
regionstringnoneYesThe AWS region where the S3 bucket is located.
s3_bucketstringnoneYesThe name of the S3 bucket to upload to.
s3_prefixstringnoneYesThe prefix path in the S3 bucket for uploaded objects.
s3_partition_formatstring%Y/%m/%d/%H/%MNoPartition format for uploaded objects.
timeoutstring5sNoTimeout for upload operations.

Sending Queue Settings

ParameterTypeDefault ValueDescription
queue_sizeint641000Maximum number of log entries to hold in the queue.
num_consumersint10Number of parallel workers processing logs from the queue.
enable_disk_backed_queuebooltrueSaves the queue to disk so data can survive restarts.

Note: Sending Queue fields available if enabled.

Example Configuration

{
"s3uploader": {
"region": "us-west-2", // required
"s3_bucket": "my-output-bucket", // required
"s3_prefix": "output/", // required
"s3_partition_format": "%Y/%m/%d/%H/%M",
},

"timeout": "30s",

"sending_queue": {
// conditional
"queue_size": 5000,
"num_consumers": 10,
"enable_disk_backed_queue": true,
},
}