Imap Attachment To Amazon S3 Operator¶
The ImapAttachmentToS3Operator
transfers an email attachment via IMAP
protocol from a mail server to an Amazon S3 Bucket.
Prerequisite Tasks¶
To use these operators, you must do a few things:
Create necessary resources using AWS Console or AWS CLI.
Install API libraries via pip.
pip install 'apache-airflow[amazon]'
Detailed information is available Installation
Imap Attachment To Amazon S3¶
task_transfer_imap_attachment_to_s3 = ImapAttachmentToS3Operator(
task_id='transfer_imap_attachment_to_s3',
imap_attachment_name=IMAP_ATTACHMENT_NAME,
s3_bucket=S3_BUCKET,
s3_key=S3_KEY,
imap_mail_folder=IMAP_MAIL_FOLDER,
imap_mail_filter=IMAP_MAIL_FILTER,
)