amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Subscriber limit exceeded: Only 10 tables can be created

Open AhmedElywa opened this issue 8 years ago • 18 comments

I think we have many problem with limit

Subscriber limit exceeded: Only 10 tables can be created, updated, or deleted simultaneously (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: LimitExceededException

AhmedElywa avatar Sep 13 '18 11:09 AhmedElywa

Hi @Ahmed2Game

Could you please describe in more details how you've encountered this issue? i.e. Which category did you add/update before the push?

You've probably hit a CloudFormation limitation, there are a few of discussions about it online, such as https://github.com/serverless/serverless/issues/3744 https://github.com/serverless/serverless/issues/2622

UnleashedMind avatar Sep 17 '18 21:09 UnleashedMind

This problem if you build schema.graphql with more than 10 table when push api have this error Dynamodb limitation 10 table in add update delete in same time

AhmedElywa avatar Sep 17 '18 22:09 AhmedElywa

@Ahmed2Game That's a DynamoDB service limitation. The workaround for that would be to add 10 @model(s) in your schema at a time so that Dynamo can provision those 10 tables and then update the schema with the next 10 models and repeat the same pattern. This limitation is only during the creation of the DynamoDB tables and shouldn't affect updates I beleive.

kaustavghosh06 avatar Sep 21 '18 03:09 kaustavghosh06

Yes this can help will try it thanks

AhmedElywa avatar Sep 21 '18 07:09 AhmedElywa

We are working on solving these limits with CloudFormation and various other downstream services. The idea is that most of these issues can be solved by breaking the transform output into a set of nested stacks instead of just one. This is being actively worked on.

mikeparisstuff avatar Sep 24 '18 20:09 mikeparisstuff

Adding a DependsOn for each AWS::DynamoDB::Table resource (as mentioned here: https://github.com/serverless/serverless/issues/3744#issuecomment-346182964) worked for me. This technique seems like a better alternative to manually adding tables and re-running deploy. Until nested stacks are implemented, I wonder if this could be a quick fix, maybe under a CLI flag option.

thisjeremiah avatar Nov 26 '18 10:11 thisjeremiah

@mikeparisstuff Curious if there has been any movement on this?

Thank you for all the hard work being put into this tool.

mwarger avatar Dec 09 '18 16:12 mwarger

I think I just found a GitHub bug...

I'm not sure why my comment unassigned @mikeparisstuff from this ticket. Sorry @kaustavghosh06 😛

image

mwarger avatar Dec 09 '18 16:12 mwarger

Hey guys, this problems seems to have been mitigated with all the CLI versions > 1.0.0 which now supports nested stacks for deployment of your GraphQL API and you can deploy more than 10 models at a time.

kaustavghosh06 avatar Apr 03 '19 05:04 kaustavghosh06

Hey guys, this problems seems to have been mitigated with all the CLI versions > 1.0.0 which now supports nested stacks for deployment of your GraphQL API and you can deploy more than 10 models at a time.

@kaustavghosh06

I am still getting Subscriber limit exceeded ( I have more than 50 dynamo table ) and I am using amplify to create appsync resolvers and dynamodb table for all model

trupa7 avatar Oct 14 '19 22:10 trupa7

We also just faced this issue today. Unable to reproduce it every time, sometime it works, other times it doesn't

CREATE_FAILED UserSubscriptionDaysTable AWS::DynamoDB::Table Fri Apr 10 2020 23:00:40 GMT+0530 (India Standard Time) Subscriber limit exceeded: You have exceeded the maximum num ber of indexed tables that can be created simultaneously (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: LimitExceededException; Request ID: JJ8K3E9LIQS5DMHRVNB44FIVI7VV4KQNSO5AEMVJF66Q9ASUAAJG)

varunpsr avatar Apr 10 '20 17:04 varunpsr

Hello, I'm having the same issue with Amplify 4.18.1.

iShavgula-TacTill avatar May 06 '20 12:05 iShavgula-TacTill

We have 47 tables still an issue with 4.27.0. Adding dependOn works when creating envs manually but we are looking for a solution that will allow PR env to build automatically again which has been broken somewhere around 37 models.

mormsbee avatar Aug 10 '20 15:08 mormsbee

I just ran into this same error. Could it be that there is a built-in Subscriber type in DynamoDB (or somewhere in the amplify graphql transform pipeline)? When I rename my graphql type from Subscriber to Follower the error goes away.

loganpowell avatar Oct 14 '20 13:10 loganpowell

We are facing this issue now as well. Really a pain.

SourceCode avatar Nov 07 '20 08:11 SourceCode

WORK AROUND FIX AVAILABLE https://www.npmjs.com/package/amplify-slow-table-create

Code that does the work is here: https://github.com/mormsbee/amplify-slow-table-create/blob/main/event-handlers/handle-PrePush.js

It could be prettier code I wrote this in a very short amount of time. It get's the job done though. In the prePush event I crack open the cloudformation and for every dynamodb table, I add the preceding table as a dependency. Works like a champ. We are at roughly 60 tables now and no issues. :)

You can install it by doing the following:

npm install -g amplify-slow-table-create amplify plugin add slow-table-create

afterwards you can just use: amplify push --minify --yes to push out your code as you would normally. You will see a big blob of JSON output to the push if installed properly.

I also, HIGHLY encourage everyone to read the documentation on authoring amplify cli plugins: https://docs.amplify.aws/cli/plugins/authoring

This is how we can get around a lot of the issues we are facing. :)

mormsbee avatar Nov 09 '20 15:11 mormsbee

We are experiencing this issue when spinning up new environments with 26 tables and running on amplify-cli version 4.37.0 - @mikeparisstuff do you have suggested remediations or work-arounds?

benmj avatar Dec 03 '20 22:12 benmj

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

github-actions[bot] avatar May 25 '21 12:05 github-actions[bot]