简体   繁体   中英

"amplify push function" error: Resource is not in the state stackUpdateComplete

Here's what I do:

  1. amplify add function (...and then go through the wizard in order to create a serverless function...);
  2. amplify push ;

And, boom! Here's what I get

× An error occurred when pushing the resources to the cloud An error occurred during the push operation: / Resource is not in the state stackUpdateComplete

In the s3 bucket, I can see that the function zip file got created under /amplify-builds.

Oh, and before you ask, I've found no deployment-state.json file at the root level.

CloudFormation tells me that resource update failed because of:

Embedded stack arn:aws:cloudformation:::stack/amplify----api-/ was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to update: [GraphQLAPITransformerSchema3CB2AE18].

I've tried amplify remove function followed by amplify add function without significant result.

The error log file doesn't really help either:

{
    "message": "Resource is not in the state stackUpdateComplete",
    "code": "ResourceNotReady",
    "retryable": false,
    "time": "2022-07-15T16:49:21.011Z",
    "statusCode": 200,
    "retryDelay": 30000
}

Where should I go from here?

You should go CloudFormation UI directly, find this resource and select "Stack Actions" in top right corner. You will see buttons "Continue" or "Cancel" update stack. After this actions "amplify push" should work

sometimes I find more meaningful errors in the build section of amplify studio screen. The one where it says deployment complete/failed like below.

在此处输入图像描述

what do you see there?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM