Hello, is there an example of how I add s3 file as...
# prefect-community
Hello, is there an example of how I add s3 file as an attachment to prefect email task , I looked at the code and the current attachments param only support local uri , TIA
I haven’t seen a ready example. You’d have to make your own version of the task and modify the existing task. I think you’d need to download that s3 file first
@Prasanth Kothuri sending attachments in automated email tasks is difficult since attachments are generally considered a security risk. Is there any reason you couldn't send just a link to the S3 object in your email text message? I remember I had a similar use case in the past and solved it using presigned URLs in S3. Basically, you send a normal email message, but within your message, you send a presigned URL that allows downloading the S3 object with a single click from within the email with no extra authentication because the URL is already presigned to be authenticated for up to 6 hours. LMK if you are interested in seeing an example.
thats a great idea, our s3 is based on openstack ceph storage, I will check if we have presigned URL functionality
This is an S3 feature available to everyone :)
here is an example from my older blog post
you are right I could do that with
s3cmd signurl
so any API would work as well, thanks a ton
👍 1