
AWS SQS Trigger
CertifiedTrigger on SQS messages (batch polling)
AWS SQS Trigger
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.
type: io.kestra.plugin.aws.sqs.TriggerExamples
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
queueUrl *string
Queue url
accessKeyId string
Access key id
allowConcurrent boolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
autoDelete booleanstring
trueAuto 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.
connectionAcquisitionTimeout string
PT5SConnection acquisition timeout
endpointOverride string
Endpoint override
interval string
PT1MdurationInterval
maxConcurrency integerstring
50Max concurrency
maxDuration string
Max duration
Keep polling until this duration elapses, even if the queue is empty, or until maxRecords is reached.
maxRecords integerstring
Max records
Stop after consuming this many messages.
region string
Region
secretKeyId string
Secret key id
serdeType string
STRINGSTRINGJSONSerde type
Serializer/deserializer used for message bodies.
sessionToken string
Session token
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
stsEndpointOverride string
Sts endpoint override
stsRoleArn string
Sts role arn
stsRoleExternalId string
Sts role external id
stsRoleSessionDuration string
PT15MSts role session duration
stsRoleSessionName string
Sts role session name
visibilityTimeout integerstring
30Visibility 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.
when string
trueA 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.
Outputs
count integer
Consumed count
Messages read within limits.
failedDeletesCount integer
0Messages 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.
uri string
uriMessages file URI
Internal storage URI with serialized messages.