'Apache Airflow: Can a single PythonOperator in a DAG upload multiple files to S3?

I have a DAG, which will need to upload several thousand json files in 3 layers of folders (s3::folder1/folder2/folder3/file.json). I want to optimise this process and can't find information on uploading several files in a single operator.

Can it be done?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source