New to Kestra?
Use blueprints to kickstart your first workflows.
Export and centralize Kestra workflow and system logs into AWS CloudWatch Logs on a daily schedule, with severity filtering and exactly-once offset tracking.
id: aws-log-shipper
namespace: system
tasks:
- id: log_export
type: io.kestra.plugin.ee.core.log.LogShipper
logLevelFilter: INFO
lookbackPeriod: P1D
offsetKey: log_shipper_aws_cloudwatch_state
delete: false
logExporters:
- id: aws_cloudwatch
type: io.kestra.plugin.ee.aws.cloudwatch.LogExporter
accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
region: "{{ vars.region }}"
logGroupName: kestra
logStreamName: kestra-log-stream
triggers:
- id: daily
type: io.kestra.plugin.core.trigger.Schedule
cron: "@daily"
Centralize your Kestra workflow and system logs in AWS CloudWatch for production-grade observability, auditing, and incident investigation. This blueprint uses the Kestra Enterprise Edition log shipper to collect orchestration logs over a configurable lookback window, filter them by severity, and push them into a dedicated CloudWatch log group and stream. Instead of scraping logs from scattered execution views, you get a single, queryable destination wired into your existing AWS monitoring stack, complete with state tracking so events are exported once and never duplicated.
io.kestra.plugin.core.trigger.Schedule trigger named daily runs the flow once a day on the @daily cron.log_export task (io.kestra.plugin.ee.core.log.LogShipper) collects logs at or above INFO level over a P1D lookback period.offsetKey (log_shipper_aws_cloudwatch_state) persists the export position so each run picks up only new logs, and delete: false keeps the source logs in place after shipping.io.kestra.plugin.ee.aws.cloudwatch.LogExporter writes those logs to the CloudWatch log group kestra and log stream kestra-log-stream in the region set by vars.region.Kestra turns log shipping into a declarative, scheduled, and observable pipeline defined entirely in YAML. The Schedule trigger drives recurring exports, retries and execution history make failures visible and recoverable, and offset state guarantees no gaps or duplicates between runs. CloudWatch can store and alarm on logs, but it cannot reach into Kestra to pull orchestration and system logs on a cadence with filtering and offset bookkeeping. This blueprint fills that gap and keeps the export logic versioned alongside the rest of your workflows.
region variable set to your target AWS region.AWS_ACCESS_KEY_ID: access key for an IAM identity allowed to write to CloudWatch Logs.AWS_SECRET_KEY_ID: corresponding AWS secret access key.AWS_ACCESS_KEY_ID and AWS_SECRET_KEY_ID as secrets.region variable and confirm the kestra log group and kestra-log-stream stream exist in CloudWatch.daily schedule, or trigger a manual run to validate the export end to end.logLevelFilter (for example to WARN) to control which severities are shipped.lookbackPeriod or the schedule cron to match your retention and freshness needs.logExporters to fan logs out to additional destinations alongside CloudWatch.delete: true to purge source logs after a successful export when you want CloudWatch to be the single source of truth.