Local Filesystem to Amazon S3 Transfer Operator

Use the LocalFilesystemToS3Operator transfer to copy data from the Airflow local filesystem to an Amazon Simple Storage Service (S3) file.

Prerequisite Tasks

To use these operators, you must do a few things:

Local to Amazon S3

This operator copies data from the local filesystem to an Amazon S3 file.

To get more information about this operator visit: LocalFilesystemToS3Operator

Example usage:

airflow/providers/amazon/aws/example_dags/example_local_to_s3.py[source]

create_local_to_s3_job = LocalFilesystemToS3Operator(
    task_id="create_local_to_s3_job",
    filename="relative/path/to/file.csv",
    dest_key=S3_KEY,
    dest_bucket=S3_BUCKET,
    replace=True,
)

Was this entry helpful?