amplify-category-api
amplify-category-api copied to clipboard
Template may not exceed 1000000 bytes in size
Amplify CLI Version
12.0.3
Question
This error is blocking us from making any further changes to our API. We have a large schema and sometimes when we try to push it gives us the error Template may not exceed 1000000 bytes in size. So why did this error come apparently?
These are two GitHub issues as references:
- https://github.com/aws-amplify/amplify-category-api/issues/1453
- https://github.com/aws-amplify/amplify-cli/issues/7680
Hi @Anirudhastikar, Thanks for raising this issue. I see that using the --minify option was suggested in issue #1453 as a potential solution. Have you already tried implementing that proposed --minify option but are still running into this error?
We met with the customer and determined they are reaching a hard limit set by AppSync. For anyone else that encounters this issue, AppSync is working to increase the limit for all customers. Please refer to this ticket for the status of that feature.
Hello @Anirudhastikar, did you managed to solve this issue? I am also facing this on my production and cannot release the new changes. The same deployment on staging env was a success
AppSync is starting to roll out the change that should resolve this.
@JeetTatva are you seeing the Template may not exceed 1000000 bytes in size error or is it the Maximum number of CloudFormation resources a nested stack can create, update, or delete per operation. error? https://github.com/aws-amplify/amplify-category-api/issues/2432
AppSync is starting to roll out the change that should resolve this.
@JeetTatva are you seeing the
Template may not exceed 1000000 bytes in sizeerror or is it theMaximum number of CloudFormation resources a nested stack can create, update, or delete per operation.error? #2432
@dpilch I get the Template may not exceed 1000000 bytes in size error
AppSync has released the change in all regions. @JeetTatva are you still experiencing the issue?
@dpilch I am using Gen 2 and I see this warning. Does this mean I can ignore it and I should be good?
[Warning at /amplify-mprj-luka-sandbox-5e82b4985b/data] Template size is approaching limit: 904019/1000000. Split resources into multiple stacks or set suppressTemplateIndentation to reduce template size. [ack: @aws-cdk/core:Stack.templateSize]
No, this should not be ignored. You might be encountering a different issue (but with the same error message) than the original poster. You probably need to preform stack mapping in this case.
I'm not able to find the docs for this ATM. I'll comment back here when I find it.
AppSync has released the change in all regions. @JeetTatva are you still experiencing the issue?
When did they released the change?
The change was deployed region as of May 28.
@dpilch were you able to find anything for Gen 2? Just wondering if there is any work around or something I can do so that I don't hit the limit
Hi @dpilch, thanks for your help on this issue.
I got the same following Error on amplify build logs :
2024-08-15T16:17:12.511Z [INFO]: 🛑 ["Index: 0 State: {\"rollback\":\"rollingBack\"} Message: Template may not exceed 1000000 bytes in size."]
It is probably due to our large graphql schema, but I am not 100% sure.
It's definitely either due to a large schema and or appsync pipeline resolvers. Would really like a work around here because it basically blocks any further development work.
Also, it seem that the project is stuck in this error mode. Even if I remove some tables to reduce the size of the file, I still get the error. I tried to rollback but no success.
EDIT : In the "#current-cloud-backend" folder, I found the template file >1Mb, so it seems that it has been accepted once, and then stuck the app?
EDIT 2 : The cloudformation file in the amplify-cfn-templates/ folder and the one in the "#current-cloud-backend" are not 100% the same : the first one has 1 space indentation and the second one has 2 spaces. As consequence they don't have the same size, the second one is >1Mb while the first one is not. Also, event if I manually minify the file, when I run amplify push, the file is updated and overrided by a new one >1Mb
I'm facing the same issue with Amplify Gen 2: Template may not exceed 1000000 bytes in size. As per the documentation, I do not have the option to minify the file (as mentioned above).
To give you some context (as on September 16 2024): Models: 1 Custom Types: 32 (we have duplication check & aggregation) Custom Queries: 36 Custom Mutations: 43 And we have several modules to be developed and the counts would be significantly higher. I'm stuck with this error and I'm not sure how to move forward from here!
I really appreciate it if someone could help me to solve this issue with Amplify Gen 2. Thanks in advance.
Any updates on this issue?? Can't add even a single field in my schema.
Hello all,
I have also reached this limit and i am not able to add anything else (but i need to).
Caused By: The stack named amplify-xxx-xxx-sandbox-xxx failed to deploy: UPDATE_ROLLBACK_COMPLETE: Template may not exceed 1000000 bytes in size.
I have already disabled all the operations i could using .disableOperations(["mutations", "subscriptions"]) and now i'm stuck.
@thomasoehri You can try --minify flag to reduce the size of file but I wonder if this will work if deployed using CI/CD. minify flag was useful for me when I pushed the changes into my staging environment but for the production I use CI/CD using Amplify, there it did not minified the file and we were stuck. To resolve it I had to remove unnecessary models and properties from my schema but that is the not the correct solution but maybe for now you can use it.
I have the same issue and found out it's the ConnectionStack. I assumed Amplify was ready to host complex projects and to hit this limit in this stage of my project is really frustrating and I wonder if I made the right decision to pick amplify. I can't reduce the amount of connections, I even want to increase it. I wonder what was "fixed" a few months ago, as the limit for AppSync Schemas is still at 1MB. What exactly was "rolled out" to all regions to fix this? I think the only solution would be to increase the limit massively or to split the ConnectionStack automatically in some way. It would be great to know, if the Amplify team is working on a solution as this issue is still open but nothing happened for months.
I have the same issue and found out it's the ConnectionStack. I assumed Amplify was ready to host complex projects and to hit this limit in this stage of my project is really frustrating and I wonder if I made the right decision to pick amplify. I can't reduce the amount of connections, I even want to increase it. I wonder what was "fixed" a few months ago, as the limit for AppSync Schemas is still at 1MB. What exactly was "rolled out" to all regions to fix this? I think the only solution would be to increase the limit massively or to split the ConnectionStack automatically in some way. It would be great to know, if the Amplify team is working on a solution as this issue is still open but nothing happened for months.
Any Updates , i also got the same issue
I'm facing the same issue with Amplify Gen 2: Template may not exceed 1000000 bytes in size. As per the documentation, I do not have the option to minify the file (as mentioned above).
To give you some context (as on September 16 2024): Models: 1 Custom Types: 32 (we have duplication check & aggregation) Custom Queries: 36 Custom Mutations: 43 And we have several modules to be developed and the counts would be significantly higher. I'm stuck with this error and I'm not sure how to move forward from here!
I really appreciate it if someone could help me to solve this issue with Amplify Gen 2. Thanks in advance.
Any Update regarding it , Brother i couldnot find anything !
I've had to move away from the amplify graphql features completely because of this issue and had to revert to the CDK to make an HTTP API. Any custom mutations, queries, etc in a production scale project will eventually reach this error. The more features/tables/etc you add to your project you will eventually hit this and be stuck.
I've had to move away from the amplify graphql features completely because of this issue and had to revert to the CDK to make an HTTP API. Any custom mutations, queries, etc in a production scale project will eventually reach this error. The more features/tables/etc you add to your project you will eventually hit this and be stuck.
Yes AWS must take care of such problems as we are paying for their services . That's not fair . Even making nested stacks . the project wont be Scalable . Must be taken care . Also AWS business support also don't have the robust answer. @AnilMaktala @dpilch . what i feel is aws is limitting because of security its totally a bad approach . we are stucked
Sill this issue is not fixed, Last year March I reported this issue. because of the hard limit issue we are reducing our resources and models. Ref :- https://github.com/aws-amplify/amplify-category-api/issues/2324
Our Current stack size is 1.2 Mb even after using Minify the size of the connectionstack.json is 1.04MB
@AnilMaktala
Any news concerning the release date ?
any update regarding this