AWS SQS Trigger

AWS SQS Trigger

Certified

Trigger on SQS messages (batch polling)

Polls a queue on an interval and creates an execution when messages are fetched, stopping at maxRecords or maxDuration. Messages are stored at trigger.uri; autoDelete controls deletion. For per-message realtime, use RealtimeTrigger.

yaml
type: io.kestra.plugin.aws.sqs.Trigger
yaml
id: sqs
namespace: company.team

tasks:
  - id: log
    type: io.kestra.plugin.core.log.Log
    message: "{{ trigger.data }}"

triggers:
  - id: trigger
    type: io.kestra.plugin.aws.sqs.Trigger
    accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
    secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
    region: "eu-central-1"
    queueUrl: "https://sqs.eu-central-1.amazonaws.com/000000000000/test-queue"
    maxRecords: 10
Properties

Queue url

Access key id

Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

Defaulttrue

Auto delete

If true (default), received messages are deleted from the queue once they are stored. A poll that fails or is killed deletes nothing, and its messages are delivered again once hidden time runs out. Set maxRecords to bound how many messages a poll holds, since SQS caps in-flight messages per queue. The evaluation fails when no delete succeeds.

DefaultPT5S

Connection acquisition timeout

Endpoint override

DefaultPT1M
Formatduration

Interval

Default50

Max concurrency

Max duration

Keep polling until this duration elapses, even if the queue is empty, or until maxRecords is reached.

Max records

Stop after consuming this many messages.

Region

Secret key id

DefaultSTRING
Possible Values
STRINGJSON

Serde type

Serializer/deserializer used for message bodies.

Session token

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Sts endpoint override

Sts role arn

Sts role external id

DefaultPT15M

Sts role session duration

Sts role session name

Default30

Visibility timeout

Seconds a received message stays hidden, from 0 to 43200. Default 30s. With autoDelete and maxDuration, received messages stay hidden for the rest of the poll plus this value, so the poll has this many seconds after maxDuration to store and delete them. Past the 43200 cap, a message comes back mid-poll and the poll stops receiving. With autoDelete and no maxDuration, a poll stops receiving when one of its messages comes back, so it receives for about this many seconds at most.

Defaulttrue

A condition that determines whether the trigger should run.

A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.

Consumed count

Messages read within limits.

Default0

Messages not deleted

Stored messages whose delete failed. They stay in the queue and are delivered again. The task ends in WARNING when some deletes fail, and fails when none succeed.

Formaturi

Messages file URI

Internal storage URI with serialized messages.