ImapAttachmentToS3Operator

Amazon

Transfers a mail attachment from a mail server into s3 bucket.

View on GitHub

Last Updated: May. 7, 2021

Access Instructions

Install the Amazon provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

imap_attachment_nameRequiredstrThe file name of the mail attachment that you want to transfer.
s3_keyRequiredstrThe destination file name in the s3 bucket for the attachment.
imap_check_regexboolIf set checks the imap_attachment_name for a regular expression.
imap_mail_folderstrThe folder on the mail server to look for the attachment.
imap_mail_filterstrIf set other than ‘All’ only specific mails will be checked. See imaplib.IMAP4.search() for details.
s3_overwriteboolIf set overwrites the s3 key if already exists.
imap_conn_idstrThe reference to the connection details of the mail server.
s3_conn_idstrThe reference to the s3 connection details.

Documentation

Transfers a mail attachment from a mail server into s3 bucket.

See also

For more information on how to use this operator, take a look at the guide: Imap Attachment To S3 Operator

Was this page helpful?