amazon-dynamodbserverless-frameworkmoonmail

DynamoDB limitations when deploying MoonMail


I'm trying to deploy MoonMail on AWS. However, I receive this exception from CloudFormation:

Subscriber limit exceeded: Only 10 tables can be created, updated, or deleted simultaneously

Is there another way to deploy without opening support case and asking them to remove my limit?


Solution

  • This is an AWS limit for APIs: (link)

    API-Specific Limits

    CreateTable/UpdateTable/DeleteTable

    In general, you can have up to 10 CreateTable, UpdateTable, and DeleteTable requests running simultaneously (in any combination). In other words, the total number of tables in the CREATING, UPDATING or DELETING state cannot exceed 10.

    The only exception is when you are creating a table with one or more secondary indexes. You can have up to 5 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent requests below 5.

    You could try to open a support request to AWS to raise this limit for your account, but I don't feel this is necessary. It seems that you could create the DynamoDB tables a priori, using the AWS CLI or AWS SDK, and use MoonMail with read-only access to those tables. Using the SDK (example), you could create those tables sequentially, without reaching this simultaneously creation limit.

    Another option, is to edit the s-resources-cf.json file to include only 10 tables and deploy. After that, add the missing tables and deploy again.

    Whatever solution you apply, consider creating an issue ticket in MoonMail's repo, because as it stands now, it does not work in a first try (there are 12 tables in the resources file).