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

Backend deployments Throttling: Rate exceeded

Open BardiaN opened this issue 6 years ago • 15 comments

This issue has happened before and also solved before like in aws-amplify/amplify-console#88 So again the same story, all resources could be pushed via amplify push on my local system without a single issue, but build pipeline fails to build it with the error below: # Starting phase: build # Executing command: amplifyPush --simple 2019-12-17T17:22:04.214Z [INFO]: 2019-12-17T17:22:04.216Z [INFO]: For more information on AWS Profiles, see: https://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html 2019-12-17T17:22:04.619Z [INFO]: Amplify AppID found: d1haz5673z20fp. Amplify App name is: fcf-personalization} 2019-12-17T17:22:04.752Z [INFO]: Backend environment dev found in Amplify Console app: fcf-personalization 2019-12-17T17:22:47.891Z [INFO]: 2019-12-17T17:22:48.398Z [INFO]: Note: It is recommended to run this command from the root of your app directory 2019-12-17T17:22:50.369Z [WARNING]: - Initializing your environment: dev 2019-12-17T17:23:30.227Z [WARNING]: ✔ Initialized provider successfully. 2019-12-17T17:23:33.649Z [WARNING]: - Updating resources in the cloud. This may take a few minutes... 2019-12-17T17:23:34.068Z [INFO]: Throttling: Rate exceeded at Request.extractError (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/protocol/query.js:50:29) at Request.callListeners (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:106:20) at Request.emit (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:78:10) at Request.emit (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:683:14) at Request.transition (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:22:10) at AcceptorStateMachine.runTo (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/state_machine.js:14:12) at /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/state_machine.js:26:10 at Request. (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:38:9) at Request. (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:685:12) at Request.callListeners (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:116:18) 2019-12-17T17:23:34.070Z [WARNING]: ✖ An error occurred when pushing the resources to the cloud 2019-12-17T17:23:34.071Z [WARNING]: ✖ There was an error initializing your environment. 2019-12-17T17:23:34.071Z [INFO]: init failed 2019-12-17T17:23:34.073Z [INFO]: Error: Project stack doesn't exist at Response.cfnModel.describeStacks.err (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/src/aws-utils/aws-cfn.js:232:22) at Request. (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:364:18) at Request.callListeners (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:106:20) at Request.emit (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:78:10) at Request.emit (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:683:14) at Request.transition (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:22:10) at AcceptorStateMachine.runTo (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/state_machine.js:14:12) at /root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/state_machine.js:26:10 at Request. (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:38:9) at Request. (/root/.nvm/versions/node/v10.16.0/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:685:12) 2019-12-17T17:23:34.215Z [ERROR]: !!! Build failed 2019-12-17T17:23:34.215Z [ERROR]: !!! Non-Zero Exit Code detected 2019-12-17T17:23:34.215Z [INFO]: # Starting environment caching... 2019-12-17T17:23:34.216Z [INFO]: # Environment caching completed

BardiaN avatar Dec 17 '19 17:12 BardiaN

@BardiaN Are you able to reproduce this error continuously? Can you redeploy the build of your app to check?

kaustavghosh06 avatar Dec 17 '19 18:12 kaustavghosh06

@BardiaN Are you able to reproduce this error continuously? Can you redeploy the build of your app to check?

Hey @kaustavghosh06 Thanks for your reply. Well, as I mentioned in the issue description, I can easily deploy all resources by running ‘amplify push’ on my local system. I’m using Amplify CLI V4.6.0. (Same as the console is using currently) Also, if I push “redeploy this version” button, it might work, I really don’t know what it depends on. If you guys think posting my appId could help, I’ll post it.

BardiaN avatar Dec 17 '19 19:12 BardiaN

@BardiaN CFN is throttling the calls as we're requesting information from the stack to display logs. If you are doing simultaneous backend builds or done a push back-back this error can pop up. We are working on a fix to handle this scenario more gracefully.

swaminator avatar Dec 17 '19 20:12 swaminator

@BardiaN CFN is throttling the calls as we're requesting information from the stack to display logs. If you are doing simultaneous backend builds or done a push back-back this error can pop up. We are working on a fix to handle this scenario more gracefully.

@swaminator Thanks for getting back to me. Actually, no, I haven’t throttled it at all! I simply merged a request in my git system which caused a new build and it went straight to failed status. After that, I tried deploying using my local CLI and it worked, but the problem is that my CLI can’t deploy the frontend, so I’m stuck. I event tried changing the CLI version in my build settings, still the same.

BardiaN avatar Dec 17 '19 20:12 BardiaN

@BardiaN Can you please re-deploy the app using the latest version of the CLI using the console now? If you see the same error, could you please provide your appID?

kaustavghosh06 avatar Dec 17 '19 20:12 kaustavghosh06

@BardiaN Can you please re-deploy the app using the latest version of the CLI using the console now? If you see the same error, could you please provide your appID?

I just did and same thing happened. So here’s my appId: d1haz5673z20fp

BardiaN avatar Dec 17 '19 21:12 BardiaN

@yuth @kaustavghosh06 Thanks for addressing this bug, looking forward to receiving the next release. But just FYI, I think throttling is happening in a pool including all applications not a specific application/account. Does it make sense? For example today I tried it again after 8 hours and same thing happened, so there was no local push, there was no back-2-back building. I mean the change that you made in CLI to retry fetching project stack will probably solve my problem, but I think you might have a bigger problem. Thank you both anyway.

BardiaN avatar Dec 18 '19 10:12 BardiaN

Hi @BardiaN can you please email us your team-provider-info.json [REDACTED]

kahdojay avatar Dec 18 '19 18:12 kahdojay

Also have hit this error again on my project, using Amplify CLI 4.6.0, currently blocked from deploying

davekiss avatar Dec 18 '19 19:12 davekiss

Hi @BardiaN can you please email us your team-provider-info.json [[REDACTED]

Sure, I’ll do that. I’m working on several AWS accounts in different teams and this is the only one that can’t be built/deployed on the console. I even created a new application, same thing happened.

BardiaN avatar Dec 18 '19 20:12 BardiaN

Hi @BardiaN can you please email us your team-provider-info.json [[REDACTED] Just did!

BardiaN avatar Dec 18 '19 21:12 BardiaN

@yuth I noticed you closed my issue but I wanted it to be known that I still can't push my Lambda function changes to AWS using the command line. We don't use the Amplify console as our Git repository is in a private GitLab not accessible by AWS. We only push via command line. Our project schedule is very tight. This issue must be resolved ASAP because we can't currently deploy to AWS. This problem never happened prior to upgrading to CLI version 4.6.0, which we upgraded to since it solved the IAM policy length issue. Now we're regretting moving to the new version!

darnmark64 avatar Dec 19 '19 11:12 darnmark64

Falling back to @aws-amplify/cli version 3.17.0 I can now perform "amplify push" without the throttling error. Seems as if something was introduced in the 4+ version.

darnmark64 avatar Dec 19 '19 13:12 darnmark64

FWIW: using the version of aws-cfn.js in the linked pull request #3020 with amplify cli 4.6.0 allowed me to move past this issue.

ryanhollander avatar Dec 19 '19 22:12 ryanhollander

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 26 '21 19:05 github-actions[bot]