-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure to build stack #1854
Comments
Correction: 55 tables |
I reduced the number of tables to 52, pushed again, and it failed: 🛑 Resource is not in the state stackUpdateComplete Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/ Session Identifier: 38b21643-f8e0-44f5-ab7d-a3c7acddf7de I can email the report if needed |
We also tried the recommended approach in: https://docs.amplify.aws/cli/graphql/override/#place-appsync-resolvers-in-custom-named-stacks But this failed with same as in #32 |
Hey @DougalW, 👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂. |
Here is a possible solution to unblock the custom named stack workaround. Consider this example:
With this configuration I have created a circular dependency. StackFoo depends on StackBar via A to B relationship |
Hi 👋 Closing this as we have not heard back from you. If you are still experiencing this issue and in need of assistance, please feel free to comment and provide us with any information previously requested by our team members so we can re-open this issue and be better able to assist you. Thank you! |
I wasn't aware anyone had requested additional information! Please point me to where this has been requested. @dpilich provided a suggestion, which we looked at but this will only solve the connection stack issue and won't alleviate the resource issue (Amplify creates too many cloudformation resources). This approach is also very fragile and manual. We have instead been pursuing an approach to reduce the dimensionality of our data model, which is very far from ideal. I will report back once we have better data. What I was hoping to see is a response to reduce the number of resources Amplify creates, built in to Amplify itself. It's not reasonable to expect your customers to keep making these fundamental tweaks just to get something to deploy successfully. I don't think you should close this issue - it's clearly still there and experienced by others, and something you need to fix in Amplify otherwise your customers will stop using Amplify for anything more than toy apps. |
I also just saw this: |
Hi @DougalW 👋 I closed the issue simply because we hadn't received a response within a week but we will always re-open an issue once we do. I understand the provided solution is only a workaround and does not result in a good developer experience. I will reach out to the team with the feedback provided so that we can come to a better solution. |
+1 to the whole paradigm of amplify+appsync falling apart around 50+ tables - AWS team how do you expect enterprise grade apps to scale with these kinds of limitations ? and just to be backed by RUSH to close valid scenarios. Work arounds are just cumbersome and painful, organizations question this tech stack offered by you Amplify!! Pathetic to say the least Amplify team! INCREASE THE DAMN LIMITS AWS AMPLIFY TEAM ! |
Have you tried removing the amplify folder in your project and running an amplify pull again? :) |
I have the same error while deploy:
And I can't understand what limit exactly. |
How can I understand which limit I have violated? There should be some hints in the logs. |
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
19.5.0
Amplify CLI Version
12.4.0
What operating system are you using?
MacOS 12.6.3
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
None
Describe the bug
We have a schema.graphql with 54 tables and 31 enums. There are 40 many:many relations across the tables.
This is by no means a massive schema, and a good size for a moderately complex SaaS app of this type. I would expect that Amplify could handle this size schema.
We are experiencing four types of errors:
the EMFILE error
ConnectionStack errors
"Limit on the number of resources in a single stack operation exceeded" errors
Parameter count > than 200 allowed max
Failure modes occur with both amplify push and push with force directive.
In detail:
Issue 1. - Have been getting this error after the schema table count went over around 40:
Raised in support Case ID: 13727852561
I tried to push a GraphQL schema update to Amplify with the following command: amplify push --force --allow-destructive-graphql-schema-updates
It keeps failing with the following error:
Then rolls back my push. This issue has been raised before here: aws-amplify/amplify-studio#414
and appeared to be resolved by increasing the ulimit on the Job container.
Issue 2. - This error is intermittent.
E.g. when creating a totally new stack:
Embedded stack arn:aws:cloudformation:ap-southeast-2:253256353881:stack/amplify-climatedisclosure-deleteme-130810-apiClimateDisclosure-YGEXC2DFOWA3/b42ad8e0-5040-11ee-864c-026a6ec0826a was not successfully created: The following resource(s) failed to create: [ConnectionStack].
...and...
Name: ConnectionStack (AWS::CloudFormation::Stack), Event Type: create, Reason: Embedded stack arn:aws:cloudformation:ap-southeast-2:253256353881:stack/amplify-climatedisclosure-deleteme-130810-apiClimateDisclosure-YGEXC2D-ConnectionStack-U6F63L520F4L/6fad0390-5041-11ee-8807-0ab22e2dcf8a was not successfully created: Limit on the number of resources in a single stack operation exceeded, IsCustomResource: false
Issue 3. - Have been getting this error after the schema table count went over 50:
amplify push --force --allow-destructive-graphql-schema-updates kept failing:
Reason: Embedded stack arn:aws:cloudformation:ap-southeast-2:253256353881:stack/amplify-climatedisclosure-dev-112157-apiClimateDisclosure-KQIOIHG9OUB-ConnectionStack-YZNJE7CIQID9/2a714690-e293-11ed-8126-0a25b4139496 was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: Limit on the number of resources in a single stack operation exceeded
We also see other errors like this:
and this:
Each of these errors has increased in frequency as the table count increased.
These seem to be caused by Amplify not correctly creating CloudFormation stacks inside CloudFormation resource limits. Some of these have been raised in these issues:
-aws-amplify/amplify-cli#9762 (comment) (@ Straubulous closed that issue on 4 May 2022 but we are still getting both errors with the latest version of the CLI).
aws-amplify/amplify-studio#414
but there is no real fix.
I've seen this suggested, but tbh it feels like a hack and doesn't work around the resource limit issue:
https://docs.amplify.aws/cli/graphql/override/#place-appsync-resolvers-in-custom-named-stacks
Please advise what to do - this makes Amplify impractical for any moderately sophisticated schema. The resource issue also makes Amplify impractical because we will very quickly hit the resource limit per-accountID.
Expected behavior
Amplify should successfully parse the schema and generated needed backend resources. It currently parses the schema just fine, but fails with the resources.
Reproduction steps
Reproducing requires trying to run a build of our project - reach out to me for access to this.
Project Identifier
5c7bc147366fc1111fe82b901e8f35f8
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: