- Newest
- Most votes
- Most comments
You can't do this without some coding. You'd need to use the raw email API instead, see https://docs.aws.amazon.com/ses/latest/dg/send-email-raw.html. This will require you to write some code to read the file from S3, and create the message.
If you are OK with sending a link to the file instead of attaching it, it might be easier to generate a presigned URL (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html) and putting that in the message text.
Here is a good example on how to use Lambda Functions to send attachments in email using SES: https://mrrishisingh.medium.com/email-s3-objects-as-attachment-7a534e78601c
Although I agree with the previous answer that it is easier and more elegant to just send the pre-signed URL in the email body because the recipient(s) will not have to use the extra bandwidth to download the file that comes with the attachment in the email.
This will also have impacts on the costs since sending attachments will incur $0.12 for each GB of attachments you send vs $0.0004 per 1,000 GET Requests directly from S3 plus the data Transfer Out at $0.09 per GB
Thanks for your reply. I did try this link yesterday and definitely feel like I followed all the steps as outlined but it didn't work. Perhaps I didn't update the code correctly but I figure I just need to update at the top where it says "sender = abc@abc.com" to the correct email as well as update the two rows below that: recipient and region.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 6 days ago
Thanks for your reply. In my particular use case it has to be an attachment, so the second link won't work for me. The first link gives really vague guidance on how to include attachments, perhaps it would make sense to a software developer but I wouldn't know how to build this code myself. Ultimately I'm looking for a guide more like what the second person responded with but I tried that yesterday and didn't work.