2

我一直在尝试让 MoonMail 程序 ( https://github.com/microapps/MoonMail/ ) 在我设置的 EC2 Ubuntu 16.04 服务器上运行,但我似乎无法通过“sls 函数部署”阶段。

我相信我已经设法部署了资源,由于我们对 DynamoDB 表的帐户限制,禁止使用 8 个表(我相信我读到这暂时不重要,因为这些似乎只用于函数调用)。

当我运行“sls function deploy”命令时,我收到以下警告:

Serverless: Deploying the specified functions in "dev" to the following regions: eu-west-1
Serverless: / Serverless: WARNING: This variable is not defined: esHost
Serverless: WARNING: This variable is not defined: esRegion
Serverless: - Serverless: WARNING: This variable is not defined: iotEndpoint
Serverless: | Serverless: WARNING: This variable is not defined: redisEndpointPort
Serverless: WARNING: This variable is not defined: redisEndpointAddress
Serverless: WARNING: This variable is not defined: redisPassword
Serverless: - Serverless: WARNING: This variable is not defined: iotEndpoint
Serverless: | Serverless: WARNING: This variable is not defined: unsubscribedCallbackUrl
Serverless: / ^C

在这一点上,我觉得这些无关紧要,但我不确定,也找不到任何其他答案。如果需要,我有权创建这些。

无论如何,此时的程序并没有失败,但它似乎运行了很长时间(约 1 小时 30 分钟)。也许这是意料之中的,但它似乎比我预期的要长,所以假设出了点问题。除了我的 _meta/_tmp 文件夹在服务器上变得非常大(> 1GB)之外,我在我的 AWS 账户中看不到任何变化。

_meta/variables/ 中用于此阶段的变量是:

{
    "defaultRegion": "eu-west-1",
    "region": "eu-west-1",
    "stage": "dev",
    "defaultRCU": 2,
    "defaultWCU": 2,
    "sentEmailsRCU": 2,
    "sendEmailsWCU": 2,
    "scheduledAtIndexRCU": 2,
    "scheduledAtIndexWCU": 2,
    "scheduledCampaignsRCU": 2,
    "scheduledCampaignsWCU": 2,
    "clicksRCU": 2,
    "clicksReportRCU": 2,
    "clicksReportWCU": 2,
    "clicksWCU": 2,
    "opensRCU": 2,
    "opensReportRCU": 2,
    "opensReportWCU": 2,
    "opensWCU": 2,
    "recipientsRCU": 2,
    "recipientsWCU": 2,
    "apiHost": "mydomain.com",
    "defaultEmailAddress": "me@mydomain.com",
    "defaultFromName": "myName"
}

这里的时间延迟是预期的吗?我使用的 EC2 服务器只是一个微型服务器,所以这可能是速度慢的原因。任何指导将不胜感激,因为我有点卡住了。

4

1 回答 1

0

如果资源部署正确,我会尝试部署一个函数来查看它是否有效。一次部署一堆功能时,无服务器效率并不高(至少 version 0.5

于 2017-09-11T11:23:22.470 回答