Skip to content
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

amplify push failed with Too Many Requests error #3159

Open
2 tasks done
kouz75 opened this issue Feb 10, 2025 · 12 comments
Open
2 tasks done

amplify push failed with Too Many Requests error #3159

kouz75 opened this issue Feb 10, 2025 · 12 comments
Labels
api-graphql bug Something isn't working transferred

Comments

@kouz75
Copy link

kouz75 commented Feb 10, 2025

How did you install the Amplify CLI?

yarn

If applicable, what version of Node.js are you using?

v20.12.2

Amplify CLI Version

12.14.3

What operating system are you using?

mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

Describe the bug

Hi,

We are not able to deploy our project anymore.
We have update our GraphQL schema (add some tables).
During "amplify push" CloudFormation failed to update the stack with following error:
Too Many Requests (Service: AppSync, Status Code: 429, Request ID: ff83079c-06e2-4015-9beb-39641616f185)" (RequestToken: 50759b9e-1c38-ad42-8951-b7f1c3e02962, HandlerErrorCode: GeneralServiceException)

Is there a way to reduce the number of requests send to AppSync during Stack update ?

thanks for your help

Expected behavior

Reproduction steps

Project Identifier

Project Identifier: ed57bb8a46476511162afa8497d78147

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@kouz75 kouz75 changed the title Too Many Requests amplify push failed with Too Many Requests error Feb 10, 2025
@kouz75
Copy link
Author

kouz75 commented Feb 11, 2025

After several attempts, I was able to apply the change

@ykethan
Copy link
Member

ykethan commented Feb 11, 2025

Hey, thanks for raising this! I'm going to transfer this over to our API repository for better assistance.

@ykethan ykethan transferred this issue from aws-amplify/amplify-cli Feb 11, 2025
@AnilMaktala AnilMaktala added the question Further information is requested label Feb 11, 2025
@sundersc
Copy link
Contributor

There are two control-plane APIs (create-function and update-function) that contribute to these throttling errors during stack update. Both these APIs have throttle limits of 70 tps each per accountId. Each user gets 100 tps across all operations (gets, create, update).

The resolvers and functions are spread across multiple child stacks and each of these child stacks have dependencies on the underlying datasource (DynamoDb tables in this case). So they naturally provide a gate to limit the number of simultaneous API calls.

We will continue to monitor and determine if any adjustments are required to the limits. Please feel free to reopen the issue if you encounter the issue again.

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

@AnilMaktala
Copy link
Member

The issue has been reopened as it is still unresolved.

@bobbyu99
Copy link
Contributor

bobbyu99 commented Feb 18, 2025

@kouz75 How often does this issue occur/not occur? How many tables does your schema have? Is it possible to share your schema? It could be helpful for reproducing this issue.

@AnilMaktala AnilMaktala added pending-community-response Issue is pending a response from the author or community. and removed pending-response labels Feb 18, 2025
@kouz75
Copy link
Author

kouz75 commented Feb 18, 2025

Hi,

Today, I was able to push the schema once, but it failed many times...

The schema contains 37 tables.
->There are 37 CloudFormation stacks managing these tables.
Each CloudFormation stack has approximately 40 AppSync resources (Resolver/Function configurations).
->The project contains around 1,500 AppSync resources that need to be updated when I push the project.
All these updates are performed in parallel (during a sort periode), which may explain the throttling issue ?

@github-actions github-actions bot added pending-maintainer-response Issue is pending a response from the Amplify team. and removed pending-community-response Issue is pending a response from the author or community. labels Feb 18, 2025
@kouz75
Copy link
Author

kouz75 commented Feb 18, 2025

As a temporary solution, I removed subscriptions on most tables (added subscriptions: null on each table).
This helps reduce the number of API calls to AppSync.

@AnilMaktala
Copy link
Member

@kouz75, Glad to hear that disabling subscriptions resolved the issue. We are actively investigating the problem on our end and will keep you updated once we have more information.

@AnilMaktala AnilMaktala added bug Something isn't working and removed question Further information is requested pending-maintainer-response Issue is pending a response from the Amplify team. labels Feb 20, 2025
@sundersc
Copy link
Contributor

@kouz75 As mentioned earlier, AppSync throttling limits are account-specific, which can sometimes impact deployment performance. If multiple developers are working in the same AWS account and running concurrent sandbox or branch deployments, this might contribute to throttling issues.

To help optimize your deployment experience, we recommend:

  • Sequencing deployments: Try running one deployment at a time per account
  • Streamlining your GraphQL API: Consider removing unused models and disabling unnecessary operations (mutations, queries, and subscriptions)

These strategies can:
✓ Reduce the number of resources Amplify generates
✓ Minimize API calls from CloudFormation to AppSync during deployment
✓ Improve overall deployment efficiency

@sundersc
Copy link
Contributor

Related Note: If you are using Gen2 sandboxes, we have observed an issue with AppSync functions hotswap that is making redundant API calls. We have a PR open with CDK team to fix it.
aws/aws-cdk-cli#99

@kouz75
Copy link
Author

kouz75 commented Feb 24, 2025

Hi,

I understand all the limitations, but we have one project with a single GraphQL schema, and we are already running only one deployment at a time. We don't use Gen2 sandboxes.

We can remove all unnecessary operations (subscriptions), but removing queries/mutations doesn’t make sense.
I'm not sure that a schema with 35 tables and one or two extra indexes per table should cause this kind of issue.

I believe the amplify push command should handle the throttling issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-graphql bug Something isn't working transferred
Projects
None yet
Development

No branches or pull requests

5 participants