Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "How to save the body of an email to S3" #98

Open
ZooeyMiller opened this issue Jul 12, 2017 · 5 comments
Open

Add "How to save the body of an email to S3" #98

ZooeyMiller opened this issue Jul 12, 2017 · 5 comments
Assignees

Comments

@ZooeyMiller
Copy link

With regards to dwyl/apprenticeship#13 (comment) we want to add a section to this repo explaining how to save the body of an email to S3 when an email is received in SES.

@ZooeyMiller
Copy link
Author

We've been struggling with "access denied" when trying to upload a text file to our s3 bucket (at the moment we're just trying to upload a string of text to s3, and once we've gotten that down look at uploading the email body).

We got it working by giving all Authenticated AWS users write access to our bucket as detailed here: https://stackoverflow.com/questions/35589641/aws-lambda-function-getting-access-denied-when-getobject-from-s3 but are now trying to set it up properly so that only specific users can have write access, but this is proving difficult.

@ZooeyMiller
Copy link
Author

We've been bashing our heads against the wall a bit with the Access Denied stuff so thought a break from it was in order, so we're going to work on trying to get the actual email saved to S3, and deal with the permission kerfuffle later when we've had some time to cool off.

@ZooeyMiller
Copy link
Author

It turns out that when we recieve emails with SES it hasn't been triggering our lambda function, so we tried to get it to just straight trigger a S3 store of everything about the email (not just the body), which weirdly worked straight away.

We can't work out why it is working to trigger an S3 upload directly but not a lambda function. The internet here is cutting out every 30 seconds so we're going to break for lunch and hope that the internet is working when we're back to try to debug this.

@ZooeyMiller
Copy link
Author

ZooeyMiller commented Jul 13, 2017

for some reason redoing the SES ruleset, and disabling virus protection made it work. We're wondering if there was something wrong with the initial set up that we didn't notice that we fixed by redoing it?

We're now re-enabling virus protection to see if that actually was the problem.

EDIT: note that there was 1.25 hrs during this time that we were on breaks, so the t4h time estimate still holds true.

@ZooeyMiller
Copy link
Author

Well, we re-enabled virus protection and it still works so... 🤷‍♀️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants