Astro Private Cloud (APC) uses Vector for log collection and forwarding. You can configure Vector to send Airflow task logs to Amazon S3 for long-term storage, compliance, or integration with other analytics tools.
If you previously configured S3 log forwarding using Fluentd in APC 0.37 or earlier, you must replace your fluentd.s3 configuration with the Vector extraSinks configuration described in this document. Fluentd is no longer used for log collection in APC 2.0.
Vector continues forwarding logs to Elasticsearch for the Airflow UI while also sending copies to S3.
The logs forwarded to S3 are Airflow task logs and deployment logs, not APC platform logs from the APC API, the deployment orchestrator, or Registry.
Create an IAM policy with S3 write permissions:
For more information on S3 permissions, see Amazon S3 actions.
For EKS clusters, use IAM Roles for Service Accounts (IRSA) to securely provide AWS credentials:
values.yaml:Add the S3 sink to your values.yaml:
For a full list of available options, see the Vector aws_s3 sink configuration reference.
Use template variables in key_prefix:
Example: airflow-logs/{{ "{{ namespace }}" }}/%Y/%m/%d/%H/
Push the configuration to your APC installation. For detailed instructions, see Apply a config change.
Verify Vector pods restart with the new configuration:
Only forward ERROR and WARNING logs to S3 using a Vector Remap Language (VRL) filter condition:
Organize logs by deployment namespace:
Forward to both S3 and another system:
Configure S3 lifecycle rules to manage log retention:
Apply via AWS CLI:
Check Vector pod logs:
Verify AWS credentials:
Inspect the logs for credential errors or permission issues.
Look for lines containing CredentialsNotLoaded (no credentials found) or Invalid credentials (credentials rejected by AWS). For example:
To see which credentials Vector loaded, look for lines matching aws_config::profile::credentials:
These lines show the access key ID in use, which can help confirm whether the correct credentials are being picked up.
Verify your IAM policy includes both s3:PutObject and s3:ListBucket permissions. The bucket resource ARN shouldn’t include /* for ListBucket.
Adjust batch settings for faster delivery: