TriggerTrigger
TriggerCertified

yaml
type: "io.kestra.plugin.aws.s3.Trigger"
yaml
id: s3_listen
namespace: company.team

tasks:
  - id: each
    type: io.kestra.plugin.core.flow.ForEach
    values: "{{ trigger.objects | jq('.[].uri') }}"
    tasks:
      - id: return
        type: io.kestra.plugin.core.debug.Return
        format: "{{ taskrun.value }}"

triggers:
  - id: watch
    type: io.kestra.plugin.aws.s3.Trigger
    interval: "PT5M"
    accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
    secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
    region: "eu-central-1"
    bucket: "my-bucket"
    prefix: "sub-dir"
    action: MOVE
    moveTo:
      key: archive
      bucket: "new-bucket"

yaml
id: s3_listen
namespace: company.team

tasks:
  - id: each
    type: io.kestra.plugin.core.flow.ForEach
    values: "{{ trigger.objects | jq('.[].key') }}"
    tasks:
      - id: return
        type: io.kestra.plugin.core.debug.Return
        format: "{{ taskrun.value }}"

      - id: delete
        type: io.kestra.plugin.aws.s3.Delete
        accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
        secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
        region: "eu-central-1"
        bucket: "my-bucket"
        key: "{{ taskrun.value }}"

triggers:
  - id: watch
    type: io.kestra.plugin.aws.s3.Trigger
    interval: "PT5M"
    accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
    secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
    region: "eu-central-1"
    bucket: "my-bucket"
    prefix: "sub-dir"
    action: NONE
Properties
Possible Values
MOVEDELETENONE
Defaultfalse
Defaultfalse
Definitions
type*Requiredobject
afterstring
Formatdate-time
beforestring
Formatdate-time
datestring
Default{{ trigger.date }}
dayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
type*Requiredobject
datestring
Default{{ trigger.date }}
dayInMonth*Requiredstring
Possible Values
FIRSTLASTSECONDTHIRDFOURTH
dayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
type*Requiredobject
datestring
Default{{ trigger.date }}
flowId*Requiredstring
namespace*Requiredstring
type*Requiredobject
labels*Requiredarrayobject
type*Requiredobject
namespace*Requiredstring
type*Requiredobject
comparisonstring
Possible Values
EQUALSPREFIXSUFFIX
prefixbooleanstring
Defaultfalse
expression*Requiredbooleanstring
type*Requiredobject
type*Requiredobject
inarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
notInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
expression*Requiredstring
type*Requiredobject
flowId*Requiredstring
namespace*Requiredstring
type*Requiredobject
namespace*Requiredstring
type*Requiredobject
prefixboolean
Defaultfalse
type*Requiredobject
inarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
notInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
conditions*Requiredobject
id*Requiredstring
Validation RegExp^[a-zA-Z0-9][a-zA-Z0-9_-]*
Min length1
type*Requiredobject
resetOnSuccessboolean
Defaulttrue
timeWindow
Default{ "type": "DURATION_WINDOW" }
deadlinestring
Formatpartial-time
endTimestring
Formatpartial-time
startTimestring
Formatpartial-time
typestring
DefaultDURATION_WINDOW
Possible Values
DAILY_TIME_DEADLINEDAILY_TIME_WINDOWDURATION_WINDOWSLIDING_WINDOW
windowstring
Formatduration
windowAdvancestring
Formatduration
windowDeprecatedstring
Formatduration
windowAdvanceDeprecatedstring
Formatduration
conditions*Required
Min items1
type*Requiredobject
conditions*Required
Min items1
type*Requiredobject
type*Requiredobject
countrystring
datestring
Default{{ trigger.date}}
subDivisionstring
type*Requiredobject
afterstring
Formattime
beforestring
Formattime
datestring
Default{{ trigger.date }}
type*Requiredobject
datestring
Default{{ trigger.date }}
DefaultBOTH
Possible Values
FILESDIRECTORYBOTH
Defaultfalse
DefaultPT1M
Formatduration
Default1000
Definitions
bucket*Requiredstring
key*Requiredstring
kmsKeyIdstring
serverSideEncryptionstring
Possible Values
NONEAES256AWS_KMS
DefaultCREATE_OR_UPDATE
Possible Values
CREATEUPDATECREATE_OR_UPDATE
Formatduration
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
DefaultPT15M
Formatduration
Definitions
changeTypestring
Possible Values
CREATEUPDATE
etagstring
keystring
lastModifiedstring
Formatdate-time
owner
displayNamestring
idstring
sizeinteger
uristring
Formaturi