aws-lambda-ses-forwarder icon indicating copy to clipboard operation
aws-lambda-ses-forwarder copied to clipboard

Added optional email cleanup on S3 at end of process

Open nbcraft opened this issue 7 years ago • 5 comments

nbcraft avatar Jan 07 '18 06:01 nbcraft

Looks good. But probably unnecessary, because you can set on bucket LifeCycle Management to expire object. For example: you can set to delete received ecah email after 1 day.

jakubboucek avatar Jan 07 '18 08:01 jakubboucek

Yeah I saw that after developing the feature.. 😞 But one argument for it though is that it will delete only if the rest of the process went through, preventing a cleanup by the bucket LifeCycle Management when something went wrong and an email wasn't properly forwarded. It's up to you guys 😉 EDIT: Also Travis crashed because I force pushed (I've seen that in the past), start it again if you please.

nbcraft avatar Jan 07 '18 08:01 nbcraft

Back to our discussion: you are right, but my experience is:

Set LifeCycle to 1 week at least. It is good for keep stack cleaned, but still ready to debug when some some is forwarded, but looks corrupted. When you want to erase is manually after success redirect, is appropriate to turn on versioning to able recovery deleted messages for unexpected fails and then must it clear it again by LifeCycle - OK, but it looks (for me) as the same concept, but more complex.

But you have right, deleting of bucket objects can be useful for some users.

Thanks you for contribution 👍

jakubboucek avatar Jan 07 '18 18:01 jakubboucek

Updated PR from recommendations.

nbcraft avatar Jan 08 '18 23:01 nbcraft

Hi, I'm interested to ad a lifecycle to 1 week, but i don't know how to write this piece of code and where. could you please help ? many thanks ps : great forward tool btw ! I'm using it everyday

astrocycles avatar Apr 26 '18 14:04 astrocycles