Configuration
Core Parameters
The S3 bucket name. Must not include a leading
s3:// or trailing /.Prefix to apply to all object keys. Supports template syntax and strftime date formatting.Use a trailing
/ to create a directory-like structure.AWS region where the S3 bucket is located.
Custom S3-compatible endpoint (for S3-compatible storage).
Authentication
The S3 sink supports multiple AWS authentication methods:AWS access key ID for authentication.
AWS secret access key for authentication.
ARN of an IAM role to assume for authentication.
Static Credentials
IAM Role
When running on EC2, ECS, or EKS, Vector can automatically use IAM role credentials:Assume Role
External ID
File Naming
Timestamp format for the time component of object keys using strftime specifiers.Set to empty string to disable timestamp in filename.
Append a UUID v4 token to the end of object keys to ensure uniqueness.Useful in high-volume workloads to prevent name collisions.
Override the file extension. By default, the extension is determined by the compression setting.
Encoding
How events are encoded before writing to S3. Options:
json: JSON encoding (one object per line)text: Plain text (one line per event)ndjson: Newline-delimited JSONcsv: CSV formatlogfmt: Logfmt encodingavro: Apache Avro binary formatparquet: Apache Parquet columnar format
Include only specified fields in the output.
Exclude specified fields from the output.
Format for timestamp fields. Options:
rfc3339, unix, unix_ms, unix_ns.Compression
Compression algorithm. Options:
none, gzip, zstd, snappy.Compression reduces storage costs and network bandwidth.Batching
Configure batching to control file size and flush frequency:Maximum size of a batch in bytes before creating a new file (10MB default).
Maximum time to wait before flushing a partial batch (5 minutes default).
S3 Options
Advanced S3-specific options:Canned ACL to apply to created objects. Options:
private, public-read, public-read-write, authenticated-read, bucket-owner-read, bucket-owner-full-control.S3 storage class. Options:
STANDARD: Standard storageREDUCED_REDUNDANCY: Reduced redundancyINTELLIGENT_TIERING: Automatic cost optimizationSTANDARD_IA: Infrequent accessONEZONE_IA: One zone infrequent accessGLACIER: Glacier storageGLACIER_IR: Glacier instant retrievalDEEP_ARCHIVE: Glacier deep archive
Server-side encryption algorithm. Options:
AES256, aws:kms.KMS key ID for server-side encryption with KMS. Required when
server_side_encryption = "aws:kms".Supports template syntax for dynamic key selection.Tags to apply to created objects.
Override the Content-Encoding header.
Override the Content-Type header.
TLS Configuration
Path to CA certificate for custom endpoints.
Request Configuration
Request timeout in seconds.
Number of retry attempts for failed requests.
Advanced Options
Use path-style addressing (bucket in path) instead of virtual-hosted style. Required for some S3-compatible services.
Complete Examples
Basic Configuration
Partitioned by Service and Date
With KMS Encryption
High-Volume Configuration
S3-Compatible Storage (MinIO)
Troubleshooting
Authentication Issues
If you encounter authentication errors:- Verify AWS credentials are correct
- Check IAM permissions include
s3:PutObjecton the bucket - Ensure the bucket exists and region is correct
- For assume role, verify trust relationships
Object Not Created
If objects aren’t appearing in S3:- Check batch timeout - may need to wait for flush
- Verify bucket name and region are correct
- Review Vector logs for errors
- Ensure sufficient data to trigger batch
Performance Issues
- Increase batch size: Larger files reduce API calls
- Enable compression: Reduces upload time
- Adjust timeout: Balance between latency and file size
- Use multiple sinks: Partition across buckets/prefixes
- Choose appropriate storage class: Consider access patterns
Best Practices
- Use date-based partitioning for easier querying and lifecycle management
- Enable compression to reduce storage costs (30-50% savings)
- Set appropriate batch sizes to balance cost and latency
- Use IAM roles instead of static credentials when possible
- Enable KMS encryption for sensitive data
- Add meaningful tags for cost tracking and organization
- Use Intelligent-Tiering storage class for unknown access patterns
- Configure S3 Lifecycle policies to archive or delete old data
- Enable S3 versioning for important data
- Monitor CloudWatch metrics for S3 API usage
Cost Optimization
- Compression: Use
gziporzstdto reduce storage costs - Batch size: Larger batches reduce PUT request costs
- Storage class: Use
STANDARD_IAfor infrequent access - Lifecycle policies: Automatically transition to cheaper storage
- Partitioning: Makes selective deletion easier