New to Kestra?
Use blueprints to kickstart your first workflows.
Trigger a Kestra flow on new file detection in an S3 bucket. Download files to internal storage and process them automatically for data pipeline automation.
Run an event-driven data pipeline that fires the moment new files arrive in an Amazon S3 bucket. Instead of polling on a fixed cron or wiring up bespoke Lambda glue, this blueprint uses Kestra's native io.kestra.plugin.aws.s3.Trigger to watch a bucket prefix and start a flow run for each batch of detected objects, so ingestion begins as soon as data is available. It solves the classic problem of reacting to file drops in object storage without standing up extra infrastructure.
wait_for_s3_object trigger (io.kestra.plugin.aws.s3.Trigger) polls the declarative-orchestration bucket under the demo prefix every second (interval: PT1S), filtering for files only (filter: FILES).{{ trigger.objects }}.action: MOVE and moveTo the archive/demo/ key, so the same file is never picked up twice.each task (io.kestra.plugin.core.flow.ForEach) iterates over the object URIs extracted with jq('.[].uri'), with concurrencyLimit: 0 to fan out across all objects at once.s3_object task (io.kestra.plugin.core.debug.Return) emits the object URI, a placeholder you swap for your real downstream processing.S3 event notifications can push to SQS or Lambda, but they do not give you orchestration: no retries, no per-run lineage, no parallel fan-out, and no declarative pipeline you can version in Git. Kestra fills that gap with an event trigger that starts a fully observable flow, automatic retries, execution history, and a declarative YAML definition that any engineer can read and extend.
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGIONbucket and prefix on the trigger to match your bucket and folder.moveTo to the archive location you want for consumed files.s3_object Return task with a download, transform, or load step (for example, write to a warehouse or DuckDB).interval for less aggressive polling, or change action to NONE to leave objects in place.errors tasks and retries for resilient ingestion.