
AWS RealtimeTrigger
CertifiedTrigger on SQS messages (realtime)
AWS RealtimeTrigger
Trigger on SQS messages (realtime)
Long-polls SQS and emits an execution per message as they arrive. Auto-delete controls deletion; use batch Trigger for grouped processing.
type: io.kestra.plugin.aws.sqs.RealtimeTriggerExamples
Consume a message from an SQS queue in real-time
id: sqs
namespace: company.team
tasks:
- id: log
type: io.kestra.plugin.core.log.Log
message: "{{ trigger.data }}"
triggers:
- id: realtime_trigger
type: io.kestra.plugin.aws.sqs.RealtimeTrigger
accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
secretKeyId: "{{ secret('AWS_SECRET_ACCESS_KEY') }}"
region: "{{ secret('AWS_DEFAULT_REGION') }}"
queueUrl: https://sqs.eu-central-1.amazonaws.com/000000000000/test-queue
Use AWS SQS Realtime Trigger to push events into DynamoDB
id: sqs_realtime_trigger
namespace: company.team
tasks:
- id: insert_into_dynamoDB
type: io.kestra.plugin.aws.dynamodb.PutItem
accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
region: eu-central-1
tableName: orders
item:
order_id: "{{ trigger.data | jq('.order_id') | first }}"
customer_name: "{{ trigger.data | jq('.customer_name') | first }}"
customer_email: "{{ trigger.data | jq('.customer_email') | first }}"
product_id: "{{ trigger.data | jq('.product_id') | first }}"
price: "{{ trigger.data | jq('.price') | first }}"
quantity: "{{ trigger.data | jq('.quantity') | first }}"
total: "{{ trigger.data | jq('.total') | first }}"
triggers:
- id: realtime_trigger
type: io.kestra.plugin.aws.sqs.RealtimeTrigger
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/orders
serdeType: JSON
Properties
queueUrl *Requiredstring
The SQS queue URL. The queue must already exist
accessKeyId string
Access Key Id in order to connect to AWS
If no credentials are defined, we will use the default credentials provider chain to fetch credentials.
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
autoDelete booleanstring
trueDelete consumed messages automatically
When set to true (default), the message is automatically deleted from SQS after being consumed. Set to false if you want to handle deletion manually.
clientRetryMaxAttempts integerstring
3The maximum number of attempts used by the SQS client's retry strategy
connectionAcquisitionTimeout string
PT5SThe amount of time to wait when acquiring a connection from the pool before giving up and timing out
endpointOverride string
The endpoint with which the SDK should communicate
This property allows you to use a different S3 compatible storage backend.
maxConcurrency integerstring
50Maximum number of allowed concurrent requests
For HTTP/1.1 this is the same as max connections. For HTTP/2 the number of connections that will be used depends on the max streams allowed per connection.
If the maximum number of concurrent requests is exceeded they may be queued in the HTTP client (see maxPendingConnectionAcquires) and can cause increased latencies. If the client is overloaded enough such that the pending connection queue fills up, subsequent requests may be rejected or time out (see connectionAcquisitionTimeout).
maxNumberOfMessage integerstring
5The maximum number of messages returned from request made to SQS
Increasing this value can reduce the number of requests made to SQS. Amazon SQS never returns more messages than this value (fewer messages might be returned). Valid values: 1 to 10. Setting this value to 1 would increase your AWS cost and latency because it requires more API requests to SQS. Note that Realtime Triggers always create one execution per message, regardless of the value of this property.
region string
AWS region with which the SDK should communicate
secretKeyId string
Secret Key Id in order to connect to AWS
If no credentials are defined, we will use the default credentials provider chain to fetch credentials.
serdeType string
STRINGSTRINGJSONThe serializer/deserializer to use
sessionToken string
AWS session token, retrieved from an AWS token service, used for authenticating that this user has received temporary permissions to access a given resource
If no credentials are defined, we will use the default credentials provider chain to fetch credentials.
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
stsEndpointOverride string
The AWS STS endpoint with which the SDKClient should communicate
stsRoleArn string
AWS STS Role
The Amazon Resource Name (ARN) of the role to assume. If set the task will use the StsAssumeRoleCredentialsProvider. If no credentials are defined, we will use the default credentials provider chain to fetch credentials.
stsRoleExternalId string
AWS STS External Id
A unique identifier that might be required when you assume a role in another account. This property is only used when an stsRoleArn is defined.
stsRoleSessionDuration string
PT15MAWS STS Session duration
The duration of the role session (default: 15 minutes, i.e., PT15M). This property is only used when an stsRoleArn is defined.
stsRoleSessionName string
AWS STS Session name
This property is only used when an stsRoleArn is defined.
visibilityTimeout integerstring
30Visibility timeout for consumed messages
When set, a received message stays hidden from other consumers for this amount of time (in seconds). The default value is 30 seconds.
waitTime string
PT20SThe duration for which the SQS client waits for a message
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
data *Requiredobject
The message data
Accepts a string (Pebble-templated, e.g. "{{ inputs.payload }}") or a structured value (map, list) that is serialized to JSON before sending. String values are rendered at runtime; non-string values are passed through Jackson.
deduplicationId string
The message deduplication ID
delaySeconds integer
The message delay in seconds
groupId string
The message group ID