无服务器的MoonMail Lambda体系结构

问题描述:

我一直在研究这个项目,因为使整个系统成为Lambda函数集合的想法似乎很吸引人.实际上,几年前,我写了一些软件,其功能与MoonMail几乎相同,并且由于某些规格的更改而需要进行更新.我正在评估将我的软件移植到Lambda上,或者只是修改它以使用MoonMail.

I've been looking into this project because the idea of having the whole system be a collection of Lambda functions seems very appealing. As a matter of fact, a few years ago I wrote some software that does pretty much the same as MoonMail does and it is due for an update as some specs have changed. I'm evaluating porting my software to Lambda or just adapting the thing to use MoonMail.

我有以下问题:

在使用Serverless的测试中,我注意到当我更改资源名称(例如DynamoDb表的名称)并重新部署时,没有任何警告,并且旧表及其内容被破坏了.我认为一个简单的错误(例如配置文件中的多余字符)会导致删除数据库中的所有数据,这是非常危险的.您如何处理此类问题?

In my tests using Serverless, I noticed that when I changed a resource name (like the name of a DynamoDb table) and redeployed, there was no warning and the old table and its contents were destroyed. I think that a simple mistake like an extra character in the config file resulting in the deletion of all data on a database is pretty risky. How do you handle this kind of issue?

关于通过SES发送电子邮件.当达到特定帐户的发送限制时,如何处理节流?您会做指数补偿吗?我似乎在代码库中找不到这个.如果您能指出我在回购中发生这种情况的一般区域,我将不胜感激.

Regarding sending email through SES. How do you handle throttling when you reach the sending limit for a particular account? Do you do exponential backoffs? I can't seem to find this in the code base. I'll be very grateful if you could point me in the general area in the repo where this happens.

  1. MoonMail的表名存储在s-templates.json中.这个文件很少被触及,因此团队还没有遇到这个问题,但是确实存在危险,我将向AWS团队询问如何通过简单地在CF中重命名来避免删除表的问题.
  2. 它会重试发送带有 Cloud Watch调用(如果我错了,MM团队会更正我,但99%的人会确定我没有错).
  1. MoonMail has its table names stored in s-templates.json. This file is rarely touched and hence the team hasn't experienced this problem yet, but it is true that danger is still there, and I would approach AWS team with question how to avoid dropping table by simply renaming it in CF.
  2. It does retries in sending limit case with Cloud Watch invocation (MM team correct me if I am wrong, but 99% sure I am not).