MoonMail Lambda architecture with server without server

I studied this project because the idea that the whole system was a set of lambda functions seems very attractive. In fact, a few years ago I wrote some software that does almost the same thing as MoonMail, and it needs to be updated as some specifications change. I appreciate porting my software to Lambda or just adapting a thing to use MoonMail.

I have the following questions:

In my tests using Serverless, I noticed that when I changed the name of the resource (for example, the name of the DynamoDb table) and redistributed, there was no warning, and the old table and its contents were destroyed. I think that a simple error, as an additional character in the configuration file, leading to the deletion of all data in the database, is quite risky. How do you deal with this problem?

Regarding sending email via SES. How do you handle throttling when you reach the send limit for a specific account? Do you perform exponential deferrals? I can not find this in the code base. I will be very grateful if you can point me in the general repo area where this happens.

+7
aws-lambda serverless-framework moonmail
source share
3 answers
  • MoonMail has its own table names stored in s-templates.json. This file is rarely affected, and therefore the team has not experienced this problem yet, but it is true that the danger still exists, and I would like to ask the AWS team how to avoid the table crashing by simply renaming it to CF.
  • He tries to send the limit with a Cloud Watch call (the MM team corrected me if I am wrong, but 99% are sure that I am not).
+5
source share

You can set DeletionPolicy: Retain when creating DynamoDB tables to prevent them from being deleted accidentally using Cloud Formation.

If your Lambda is invoked by SNS, you can simply fail when the SES limit is exceeded. SNS then restarts the delivery using derogations.

+5
source share

My approach at the moment is to create dynamodb in a separate process. Thus, my serverless setup is read-only, not db-based. Because I do not think that I will re-create my db, which is often :)

+3
source share

All Articles