Airflow Summit 2026 is coming August 31 - September 2 in Austin, TX. Register now to secure your spot!

airflow.providers.amazon.aws.utils

Submodules

Attributes

log

Functions

trim_none_values(obj)

datetime_to_epoch(date_time)

Convert a datetime object to an epoch integer (seconds).

datetime_to_epoch_ms(date_time)

Convert a datetime object to an epoch integer (milliseconds).

datetime_to_epoch_utc_ms(date_time)

Convert a datetime object to an epoch integer (milliseconds) in UTC timezone.

datetime_to_epoch_us(date_time)

Convert a datetime object to an epoch integer (microseconds).

get_airflow_version()

get_botocore_version()

Return the version number of the installed botocore package in the form of a tuple[int,...].

validate_execute_complete_event([event])

validate_destination_path(destination, base_path, *, ...)

Ensure destination stays within base_path once resolved.

Package Contents

airflow.providers.amazon.aws.utils.log[source]
airflow.providers.amazon.aws.utils.trim_none_values(obj)[source]
airflow.providers.amazon.aws.utils.datetime_to_epoch(date_time)[source]

Convert a datetime object to an epoch integer (seconds).

airflow.providers.amazon.aws.utils.datetime_to_epoch_ms(date_time)[source]

Convert a datetime object to an epoch integer (milliseconds).

airflow.providers.amazon.aws.utils.datetime_to_epoch_utc_ms(date_time)[source]

Convert a datetime object to an epoch integer (milliseconds) in UTC timezone.

airflow.providers.amazon.aws.utils.datetime_to_epoch_us(date_time)[source]

Convert a datetime object to an epoch integer (microseconds).

airflow.providers.amazon.aws.utils.get_airflow_version()[source]
airflow.providers.amazon.aws.utils.get_botocore_version()[source]

Return the version number of the installed botocore package in the form of a tuple[int,…].

airflow.providers.amazon.aws.utils.validate_execute_complete_event(event=None)[source]
airflow.providers.amazon.aws.utils.validate_destination_path(destination, base_path, *, base_name)[source]

Ensure destination stays within base_path once resolved.

In multi-file transfers the destination is base_path concatenated with a key suffix returned by list_keys. S3 object names are arbitrary strings controlled by whoever can write to the source bucket, so .. segments or an absolute name could place the upload outside base_path once the remote server resolves it on its host. base_name is the operator argument name used in the error message (e.g. sftp_path or ftp_path).

Was this entry helpful?