AWS Trigger

AWS Trigger

Certified

Trigger a flow when a HealthLake import or export job reaches a terminal state

Polls HealthLake import or export jobs at a fixed interval and fires when the most recently submitted job for the given data store reaches a terminal state (COMPLETED, COMPLETED_WITH_ERRORS, FAILED, CANCEL_COMPLETED, or CANCEL_FAILED). Exposes {{ trigger.jobId }} and {{ trigger.jobStatus }} to downstream tasks. Note: listFhirImportJobs/listFhirExportJobs with maxResults(1) returns the most recently submitted job but does not guarantee ordering by submit time; use submittedAfter filtering for strict ordering requirements.

yaml
type: io.kestra.plugin.aws.healthlake.Trigger

Trigger a flow when a FHIR import job completes.

yaml
id: on_fhir_import_complete
namespace: company.team

triggers:
  - id: import_done
    type: io.kestra.plugin.aws.healthlake.Trigger
    region: "{{ secret('AWS_REGION') }}"
    accessKeyId: "{{ secret('AWS_ACCESS_KEY_ID') }}"
    secretKeyId: "{{ secret('AWS_SECRET_ACCESS_KEY') }}"
    datastoreId: "{{ secret('HEALTHLAKE_DATASTORE_ID') }}"
    jobType: IMPORT
    interval: PT2M

tasks:
  - id: notify
    type: io.kestra.plugin.core.log.Log
    message: "FHIR import job {{ trigger.jobId }} finished with status {{ trigger.jobStatus }}"
Properties

Data store ID

The HealthLake data store to monitor.

AWS access key ID

Optional static credential. If omitted, the default credentials provider chain is used.

Defaultfalse

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

Endpoint override

Override the default AWS endpoint URL.

DefaultPT2M
Formatduration

Poll interval

How often to poll HealthLake for job status. ISO-8601 duration, e.g. PT2M for every 2 minutes.

DefaultIMPORT
Possible Values
IMPORTEXPORT

Job type

Whether to monitor IMPORT or EXPORT jobs. Default is IMPORT.

AWS region

The AWS region for the HealthLake service.

AWS secret access key

Pairs with accessKeyId for static credentials.

AWS session token

Session token for temporary credentials.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

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

STS endpoint override

Override the default STS endpoint URL.

STS role ARN

IAM role ARN to assume via STS before making API calls.

STS role external ID

External ID to pass when assuming the STS role.

DefaultPT15M

AWS 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.

STS role session name

Session name to use when assuming the STS role.

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.

Job ID

The ID of the job that reached a terminal state.

Job status

Terminal status: COMPLETED, COMPLETED_WITH_ERRORS, FAILED, CANCEL_COMPLETED, or CANCEL_FAILED.