airflow.providers.amazon.aws.bundles.s3

Classes

S3DagBundle

S3 Dag bundle - exposes a directory in S3 as a Dag bundle.

S3ArchiveDagBundle

S3 Dag bundle staged from a single .tar.gz object.

Module Contents

class airflow.providers.amazon.aws.bundles.s3.S3DagBundle(*, aws_conn_id=AwsBaseHook.default_conn_name, bucket_name, prefix='', **kwargs)[source]

Bases: _S3DagBundleBase

S3 Dag bundle - exposes a directory in S3 as a Dag bundle.

This allows Airflow to load Dags directly from an S3 bucket.

Parameters:
  • aws_conn_id (str) – Airflow connection ID for AWS. Defaults to AwsBaseHook.default_conn_name.

  • bucket_name (str) – The name of the S3 bucket containing the Dag files.

  • prefix (str) – Optional subdirectory within the S3 bucket where the Dags are stored. A trailing slash is optional. If None, Dags are assumed to be at the root of the bucket (Optional).

supports_versioning = False[source]
prefix = ''[source]
__repr__()[source]
class airflow.providers.amazon.aws.bundles.s3.S3ArchiveDagBundle(*, aws_conn_id=AwsBaseHook.default_conn_name, bucket_name, archive_key, **kwargs)[source]

Bases: _S3DagBundleBase

S3 Dag bundle staged from a single .tar.gz object.

The archive is the only source of the Dags. Members are extracted relative to the bundle root, for example tar -C <dags_dir> -czf dags.tar.gz .. Requires Python 3.11.4 or later.

Parameters:
  • aws_conn_id (str) – Airflow connection ID for AWS. Defaults to AwsBaseHook.default_conn_name.

  • bucket_name (str) – The name of the S3 bucket containing the archive.

  • archive_key (str) – S3 key of the .tar.gz archive holding the Dag files.

supports_versioning = False[source]
archive_key[source]
s3_dags_dir[source]
__repr__()[source]

Was this entry helpful?