Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the
Amplify Console GitHub Issue Tracker
Describe the bug
I recently redeployed using AWS Amplify with no backend changes and the backend failed to execute the cloudformation stack. I noticed that the failing build was using 4.21.2. I forced to use 4.21.1 and the deployment was fine. The issue happens occurs on a graphql resources (AppSync). It seems like it is trying to create a new resource that was not being created before.
Amplify CLI Version
4.21.2 is the issue
To Reproduce
amplifyPush --simple
2020-06-10T02:05:10.778Z [INFO]: UPDATE_IN_PROGRESS amplify-admin-tool-beta-133413-apiViewpoint-1NNJ2JA1DBV54-Thread-18GLNRVD7HAHX AWS::CloudFormation::Stack Wed Jun 10 2020 02:05:06 GMT+0000 (Coordinated Universal Time) User Initiated
2020-06-10T02:05:15.729Z [INFO]:
2020-06-10T02:05:15.731Z [INFO]: CREATE_IN_PROGRESS QueryqueryThreadsByPackageIdResolver AWS::AppSync::Resolver Wed Jun 10 2020 02:05:13 GMT+0000 (Coordinated Universal Time)
2020-06-10T02:05:15.811Z [INFO]:
2020-06-10T02:05:15.813Z [INFO]: CREATE_IN_PROGRESS QueryqueryThreadCommentsByThreadIdResolver AWS::AppSync::Resolver Wed Jun 10 2020 02:05:13 GMT+0000 (Coordinated Universal Time)
CREATE_FAILED QueryqueryThreadCommentsByThreadIdResolver AWS::AppSync::Resolver Wed Jun 10 2020 02:05:15 GMT+0000 (Coordinated Universal Time) No field named queryThreadCommentsByThreadId found on type Query (Service: AWSAppSync; Status Code: 404; Error Code: NotFoundException; Request ID: defba8de-fad9-4314-af63-5565baeed03f)
2020-06-10T02:05:20.549Z [INFO]:
2020-06-10T02:05:20.551Z [INFO]: UPDATE_FAILED ThreadComment AWS::CloudFormation::Stack Wed Jun 10 2020 02:05:16 GMT+0000 (Coordinated Universal Time) Embedded stack arn:aws:cloudformation:us-west-2:633338255596:stack/amplify-admin-tool-beta-133413-apiViewpoint-1NNJ2JA1DBV54-ThreadComment-1SY3OCCQRZS83/840781a0-a507-11ea-8c36-069318d3f048 was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to create: [QueryqueryThreadCommentsByThreadIdResolver].
2020-06-10T02:05:20.705Z [INFO]:
2020-06-10T02:05:20.705Z [INFO]: UPDATE_ROLLBACK_IN_PROGRESS amplify-admin-tool-beta-133413-apiViewpoint-1NNJ2JA1DBV54-ThreadComment-1SY3OCCQRZS83 AWS::CloudFormation::Stack Wed Jun 10 2020 02:05:16 GMT+0000 (Coordinated Universal Time) The following resource(s) failed to create: [QueryqueryThreadCommentsByThreadIdResolver].
2020-06-10T02:05:20.807Z [INFO]:
2020-06-10T02:05:20.808Z [INFO]: CREATE_FAILED QueryqueryThreadsByPackageIdResolver AWS::AppSync::Resolver Wed Jun 10 2020 02:05:16 GMT+0000 (Coordinated Universal Time) No field named queryThreadsByPackageId found on type Query (Service: AWSAppSync; Status Code: 404; Error Code: NotFoundException; Request ID: 9e41f7aa-cf9b-430f-b00d-39c59327e46b)
UPDATE_ROLLBACK_IN_PROGRESS amplify-admin-tool-beta-133413-apiViewpoint-1NNJ2JA1DBV54-Thread-18GLNRVD7HAHX AWS::CloudFormation::Stack Wed Jun 10 2020 02:05:16 GMT+0000 (Coordinated Universal Time) Initiated by parent stack
2020-06-10T02:05:30.580Z [INFO]:
2020-06-10T02:05:30.582Z [INFO]: UPDATE_FAILED Thread AWS::CloudFormation::Stack Wed Jun 10 2020 02:05:27 GMT+0000 (Coordinated Universal Time) Resource update cancelled
UPDATE_ROLLBACK_IN_PROGRESS amplify-admin-tool-beta-133413-apiViewpoint-1NNJ2JA1DBV54 AWS::CloudFormation::Stack Wed Jun 10 2020 02:05:27 GMT+0000 (Coordinated Universal Time) The following resource(s) failed to update: [Thread, ThreadComment].
2020-06-10T02:05:35.504Z [INFO]:
2020-06-10T02:05:35.506Z [INFO]: UPDATE_FAILED apiViewpoint AWS::CloudFormation::Stack Wed Jun 10 2020 02:05:32 GMT+0000 (Coordinated Universal Time) Embedded stack arn:aws:cloudformation:us-west-2:633338255596:stack/amplify-admin-tool-beta-133413-apiViewpoint-1NNJ2JA1DBV54/401d0850-a2bb-11ea-9099-06ee5e9000d6 was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to update: [Thread, ThreadComment].
UPDATE_ROLLBACK_IN_PROGRESS amplify-admin-tool-beta-133413 AWS::CloudFormation::Stack Wed Jun 10 2020 02:05:33 GMT+0000 (Coordinated Universal Time) The following resource(s) failed to update: [apiViewpoint].
Expected behavior
Successful deployment
Additional context
Add any other context about the problem here.
I have the same issue whenever I deploy. It started a few hours ago and seems the same timing of 4.21.2 release.
@gakinson @segakazzz Could you please share your schema for us to reproduce this behavior? You can also send it to [email protected] if you don't want to paste your schema out here. Thank you.
@gakinson @segakazzz do you know which version of the CLI your API was pushed with initially?
@nikhname The version I could deploy last time was 4.21.1. It started to fail after the latest updated to 4.21.2
2020-06-09T23:59:55.763Z [INFO]: # Patching NPM package '@aws-amplify/cli' from 1.12.0 to 4.21.1...
2020-06-10T01:16:24.889Z [INFO]: # Patching NPM package '@aws-amplify/cli' from 1.12.0 to 4.21.2...
@segakazzz could you share what your @key directive for failing type looks like
This is the one of failing types.
type Ingredient @model
@key(name: "byIngGroup", fields: ["groupID"])
.....
2020-06-10T01:18:38.026Z [INFO]: CREATE_FAILED QueryqueryIngredientsByIngGroupResolver AWS::AppSync::Resolver Wed Jun 10 2020 01:18:34 GMT+0000 (Coordinated Universal Time) No field named queryIngredientsByIngGroup found on type Query (Service: AWSAppSync; Status Code: 404; Error Code: NotFoundException; Request ID: 60e5544d-c63d-478a-9e2d-6a1a2785d0f3)
@segakazzz
@yuth It's failing on amplify console. I am deploying my code with git push using default amplify.yml
@kaustavghosh06 I sent the schema file to [email protected]
@gakinson @segakazzz we are working on this actively and will update here when a fix is available. To mitigate this issue we suggest using CLI version 4.21.1 in your console build for now.
@nikhname Thanks for the update. Could you advise how to specify CLI version on console?
@segakazzz Its documented here under the heading "Live Package Updates"

@yuth It worked. Thanks.
Hey, sorry for the late response, here is my schema I use on the backend:
type Thread @model(subscriptions: null)
@key(fields: ["decisionId","resourceId"])
@key(name: "byPackageId", fields: ["packageId"]){
decisionId: String!
resourceId: String!
packageId: String!
comments: [ThreadComment] @connection(keyName: "byThreadId", fields: ["decisionId", "resourceId"])
}
type ThreadComment @model(subscriptions: null)
@key(name:"byThreadId", fields: ["decisionId", "resourceId"])
@auth(rules: [{ allow: owner, ownerField: "userId", operations: [create, delete, update] }]){
id: ID!
decisionId: String!
resourceId: String!
comment: String!
userId: String
}
type Subscription {
onCreateThreadComment(decisionId: String, resourceId: String): ThreadComment @aws_subscribe(mutations: ["createThreadComment"])
onDeleteThreadComment(decisionId: String, resourceId: String): ThreadComment @aws_subscribe(mutations: ["deleteThreadComment"])
onUpdateThreadComment(decisionId: String, resourceId: String): ThreadComment @aws_subscribe(mutations: ["updateThreadComment"])
onCreateThread(decisionId: String): Thread @aws_subscribe(mutations: ["createThread"])
onDeleteThread(decisionId: String): Thread @aws_subscribe(mutations: ["deleteThread"])
}
My process was just pushing to code commit (git) and then allowing the amplify console do its deployment.
My build setting for amplify console is set to use latest for Amplify CLI. I can't remember what my initial version was but I know setting it to 4.21.1 allowed the build build to go through.

@gakinson @segakazzz the changes introduced have been rolled back and this deployment issue will no longer occur in the latest CLI (4.21.3) The pinned 4.21.1 version can be removed from the console.
Most helpful comment
@yuth It worked. Thanks.