Skip to main content

otb-airflow-triggers

Quality checks PyPI version Python 3.12+ Release status

Introduction

This repository contains custom openthebox Airflow triggers for the openthebox Airflow repository.

The triggers must be available to the Airflow triggerer service as well as the worker pods. They therefore need a separate package that each service can install independently. Code available only in worker pods cannot run in the triggerer service.

Triggers

Trigger Description
aws.ec2.CommandTrigger Monitor an SSM command running on an EC2 instance.

AWS permissions

Grant these permissions to the AWS identity that the triggerer uses.

Permission Purpose Triggers
ssm:ListCommandInvocations Read command status and document step results. CommandTrigger
ssm:GetCommandInvocation Read failure output and exit codes. CommandTrigger
ssm:DescribeInstanceInformation Check the SSM agent connection. CommandTrigger
ec2:DescribeInstanceStatus Read instance state and EC2 health results. CommandTrigger
ec2:StopInstances Stop an instance after repeated health failures. CommandTrigger
logs:DescribeLogStreams Find command output streams in CloudWatch. CommandTrigger
logs:GetLogEvents Read standard output and error output from CloudWatch. CommandTrigger

Installation & usage

Use Python 3.12 or later. Install the same package version in the Airflow triggerer and worker environments.

python -m pip install otb-airflow-triggers

After submitting an SSM command, defer the task with CommandTrigger from your custom operator's execute() method. Use the submitted command's ID and the target instance's ID.

from otb_airflow_triggers.aws.ec2 import CommandTrigger

self.defer(
    trigger=CommandTrigger(
        command_id=command_id,
        instance_id=instance_id,
        aws_conn_id="aws_default",
        region_name="eu-west-1",
        waiter_delay=30,
        waiter_max_attempts=120,
    ),
    method_name="execute_complete",
)

Implement execute_complete(self, context, event) in the operator to handle the result. Check event["status"] and raise AirflowException when it is failed. Failure events include a message with the reason. See the CommandTrigger documentation for configuration and result details.

Contributing

See CONTRIBUTING.md for dependencies, local development, GitHub workflows, and deployment.

Metadata

Release files for otb-airflow-triggers 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for otb-airflow-triggers 1.1.0
File Size Uploaded Provenance Actions
otb_airflow_triggers-1.1.0.tar.gz 14.4 kB With provenance Details for otb_airflow_triggers-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for otb-airflow-triggers 1.1.0
File Interpreter ABI Platform Actions
otb_airflow_triggers-1.1.0-py3-none-any.whl Python 3 none any Details for otb_airflow_triggers-1.1.0-py3-none-any.whl

Total release size: 27.3 kB

Release files / otb_airflow_triggers-1.1.0.tar.gz

Download URL otb_airflow_triggers-1.1.0.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
46898fe1d420e81a1b1b1f96d6d93cdb00046f94edc5dfc9d74566d452086f75
BLAKE2b-256 checksum
How to use checksums
dbc95002ea51e76a8bf01618f8603948d45a88494a946b68d431f08baa697b4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / otb_airflow_triggers-1.1.0-py3-none-any.whl

Download URL otb_airflow_triggers-1.1.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17985205f5dfd6116e2e853ec87b3e7a8cadab1dd909ab70054f133145461c40
BLAKE2b-256 checksum
How to use checksums
ff7083de654b053aab58d25493cf3d28d3a477ff83382742c117f8fb08219de9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for otb-airflow-triggers 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for otb_airflow_triggers-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page