
AWS Trigger
CertifiedTrigger on CloudWatch metric results
AWS Trigger
Trigger on CloudWatch metric results
Polls a CloudWatch metric query at a fixed interval and fires when the query returns at least one datapoint. Reuses Query task parameters and AWS connection fields.
type: io.kestra.plugin.aws.cloudwatch.TriggerExamples
Trigger when a CloudWatch metric query returns non-empty results
id: aws_cloudwatch_trigger
namespace: company.team
tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
values: "{{ trigger.series }}"
tasks:
- id: log
type: io.kestra.plugin.core.log.Log
message: "Datapoint: {{ fromJson(taskrun.value) }}"
triggers:
- id: watch
type: io.kestra.plugin.aws.cloudwatch.Trigger
interval: "PT1M"
accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
secretKeyId: "{{ secret('AWS_SECRET_KEY_ID') }}"
region: "us-east-1"
namespace: "AWS/EC2"
metricName: "CPUUtilization"
statistic: "Average"
periodSeconds: 60
window: PT5M
dimensions:
- name: "InstanceId"
value: "i-0abcd1234ef567890"
Properties
accessKeyId string
AWS access key ID
Optional static credential. If omitted, the default credentials provider chain is used.
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
dimensions array
Dimensions
io.kestra.plugin.aws.cloudwatch.Query-DimensionKV
Dimension name
Dimension value
endpointOverride string
Endpoint override
interval Non-dynamicstring
PT1MdurationInterval
metricName string
Metric name
namespace string
Namespace
periodSeconds integerstring
Period seconds
region string
Region
secretKeyId string
AWS secret access key
Pairs with accessKeyId for static credentials. If omitted, the default credentials provider chain is used.
sessionToken string
AWS session token for temporary credentials
Used with STS- or SSO-issued temporary credentials. If omitted, the default credentials provider chain is used.
statistic string
Statistic
stopAfter Non-dynamicarray
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
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.
window string
Window
Outputs
count integer
Datapoint count
Number of datapoints returned after sorting.
series array
Series
List of datapoints as maps, sorted by timestamp.