Amplify-cli: Resource is not in the state stackUpdateComplete

Created on 30 Aug 2018  Ā·  73Comments  Ā·  Source: aws-amplify/amplify-cli

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
After enabling analytics with auth, and pushing, the user is not able to runamplify auth update(and select default configuration) and then push without receiving the error"Resource is not in the state stackUpdateComplete". When the auth stack in cloudformation is inspected, the following error is observed:
Parameters: [autoVerifiedAttributes, smsVerificationMessage, userpoolClientReadAttributes, mfaTypes, emailVerificationSubject, useDefault, userpoolClientGenerateSecret, mfaConfiguration, userpoolClientLogPolicy, smsAuthenticationMessage, roleExternalId, mfaLambdaLogPolicy, passwordPolicyMinLength, userPoolName, policyName, userpoolClientName, userpoolClientLambdaPolicy, mfaLambdaIAMPolicy, mfaPassRolePolicy, emailVerificationMessage, userpoolClientRefreshTokenValidity, userpoolClientSetAttributes, requiredAttributes, roleName, passwordPolicyCharacters, userpoolClientLambdaRole, defaultPasswordPolicy, mfaLambdaRole] must have values. (These are userpool attributes, which should all be added since the default auth configuration is adding a userpool to the identity pool that was created when analytics was enabled.)

However, the user's auth resources's parameters.json file appears to contain all of these parameters, and their cloudformation template appears to be formed correctly.

UPDATE:
This issue also occurs when running amplify api add, but with the api stacking being affected instead of the auth stack:
Parameters: [MutationCreateNoteResponse, QueryListNotesResponse, QueryGetNoteRequest, MutationDeleteNoteRequest, QueryGetNoteResponse, QueryListNotesRequest, MutationCreateNoteRequest, schemaGraphql, MutationDeleteNoteResponse, MutationUpdateNoteRequest, MutationUpdateNoteResponse] must have values

Steps to reproduce the issue:
This issue occurs _intermittently_, and the repro steps listed here are provisional. The precise circumstances causing this error are not yet know.

  1. amplify init (iOS project)
  2. amplify analytics add (w/ auth)
  3. amplify push (successful)
  4. amplify auth update (select default configuration)
  5. amplify auth push

What is the expected behavior?
Auth stack should update appropriately.

Additional environment details

  • OS version (ie Windows 10 build X, macOS Sierra 10.12.6, etc.)
    macOS

  • Output of amplify --version:
    0.1.15

  • Did this work in previous versions?:
    Uncertain, since the issue is intermittent

bug work-in-progress

Most helpful comment

@michaelcaterisano How many [pairs of] @connection fields were you tweaking in the single update? I believe the issue only occurs when making changes that result in more than 1 GSI create/update/delete on a single table. In the short term, you can get around this issue by breaking up the push into multiple steps where you only change 1 connection at a time. In the long term, I think we can get around these issues with tooling that warns you or, even better, that automatically breaks up the push into multiple steps. I will also take an action item to document this in the amplify docs.

E.G. The CLI works when going from:

type Meeting @model {
  id: ID!
  name: String!
  room: Room @connection(name: "RoomMeetings")
}

type Room @model {
  id: ID!
  number: Int!
  meetings: [Meeting] @connection(name: "RoomMeetings")
}

to:

type Meeting @model {
  id: ID!
  name: String!
}

type Room @model {
  id: ID!
  number: Int!
}

It also works when going from:

type Meeting @model {
  id: ID!
  name: String!
  room: Room @connection
}

to:

type Meeting @model {
  id: ID!
  name: String!
}

I noticed that it does fail when trying to add multiple connections to a model type in a single push and the reason is that DynamoDB has a limit on the number of GSIs on a single table that you can touch in a single CloudFormation update stack invocation.

E.G. When trying to go from:

type Meeting @model {
  id: ID!
  name: String!
}

type Room @model {
  id: ID!
  number: Int!
}

to:

type Meeting @model {
  id: ID!
  name: String!

  # Both of these connections will try to create GSIs on the Meeting table.
  room: Room @connection(name: "RoomMeetings")
  backupRoom: Room @connection(name: "BackupMeetings")
}

type Room @model {
  id: ID!
  number: Int!

  # Uses the same two GSIs on the Meeting table.
  meetings: [Meeting] @connection(name: "RoomMeetings")
  backupMeetings: [Meeting] @connection(name: "BackupMeetings")
}

will fail with the error

Cannot perform more than one GSI creation or deletion in a single update

We are working on bypassing a number of CloudFormation & other service related limits but for now, you can sidestep this issue by breaking your update into multiple steps. For example, we can get the above schema to work by first going from:

type Meeting @model {
  id: ID!
  name: String!
}

type Room @model {
  id: ID!
  number: Int!
}

to:

type Meeting @model {
  id: ID!
  name: String!
  room: Room @connection(name: "RoomMeetings")
}

type Room @model {
  id: ID!
  number: Int!
  meetings: [Meeting] @connection(name: "RoomMeetings")
}

and then to:

type Meeting @model {
  id: ID!
  name: String!
  room: Room @connection(name: "RoomMeetings")
  backupRoom: Room @connection(name: "BackupMeetings")
}

type Room @model {
  id: ID!
  number: Int!
  meetings: [Meeting] @connection(name: "RoomMeetings")
  backupMeetings: [Meeting] @connection(name: "BackupMeetings")
}

All 73 comments

Possibly caused by use of experimental amplify delete feature in project directory prior to re-running amplify init.

I have this issue too.

my log

ryan@ryan-ubuntu:~/Developer/myappclone$ amplify push
| Category | Resource name | Operation | Provider plugin   |
| -------- | ------------- | --------- | ----------------- |
| Api      | myapp         | Update    | awscloudformation |
? Are you sure you want to continue? true
ā ‹ Updating resources in the cloud. This may take a few minutes...
GraphQL schema compiled successfully. Edit your schema at /home/ryan/Developer/myappclone/amplify/backend/api/myapp/schema.graphql
ā ¦ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS          myapp-20180830150843 AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:36 GMT-0500 (CDT) User Initiated                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
UPDATE_IN_PROGRESS          apimyapp             AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:40 GMT-0500 (CDT)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
UPDATE_FAILED               apimyapp             AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:40 GMT-0500 (CDT) Parameters: [MutationDeletePostResponse, MutationDeleteBlogResponse, QueryListCommentsResponse, MutationDeleteBlogRequest, MutationUpdateCommentRequest, PostBlogResponse, MutationCreatePostRequest, QueryGetCommentRequest, MutationUpdatePostRequest, MutationDeleteCommentRequest, CommentPostRequest, QueryListBlogsResponse, MutationUpdateCommentResponse, PostCommentsResponse, MutationCreatePostResponse, QueryGetBlogResponse, MutationCreateBlogResponse, QueryGetPostResponse, MutationCreateCommentRequest, CommentPostResponse, MutationUpdatePostResponse, QueryGetCommentResponse, MutationUpdateBlogResponse, MutationDeletePostRequest, QueryGetBlogRequest, QueryListPostsResponse, QueryListCommentsRequest, BlogPostsResponse, MutationCreateBlogRequest, BlogPostsRequest, QueryGetPostRequest, MutationUpdateBlogRequest, PostBlogRequest, MutationCreateCommentResponse, QueryListPostsRequest, QueryListBlogsRequest, MutationDeleteCommentResponse, PostCommentsRequest] must have values
UPDATE_ROLLBACK_IN_PROGRESS myapp-20180830150843 AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:41 GMT-0500 (CDT) The following resource(s) failed to update: [apimyapp].                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
ā ™ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE                              apimyapp             AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:50 GMT-0500 (CDT) 
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS myapp-20180830150843 AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:50 GMT-0500 (CDT) 
UPDATE_IN_PROGRESS                           apimyapp             AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:51 GMT-0500 (CDT) 
UPDATE_COMPLETE                              apimyapp             AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:52 GMT-0500 (CDT) 
UPDATE_ROLLBACK_COMPLETE                     myapp-20180830150843 AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:52 GMT-0500 (CDT) 
ā § Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete

Also I get this error:

ryan@ryan-ubuntu:~/Developer/my-app$ amplify push
| Category | Resource name | Operation | Provider plugin   |
| -------- | ------------- | --------- | ----------------- |
| Api      | myapp         | Update    | awscloudformation |
? Are you sure you want to continue? true
ā ‹ Updating resources in the cloud. This may take a few minutes...
GraphQL schema compiled successfully. Edit your schema at /home/ryan/Developer/my-app/amplify/backend/api/myapp/schema.graphql
ā  Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS                           myapp-20180830150843 AWS::CloudFormation::Stack Fri Aug 31 2018 12:16:35 GMT-0500 (CDT) User Initiated                                                                                                                                                                                                                                                                                          
UPDATE_IN_PROGRESS                           apimyapp             AWS::CloudFormation::Stack Fri Aug 31 2018 12:16:39 GMT-0500 (CDT)                                                                                                                                                                                                                                                                                                         
UPDATE_FAILED                                apimyapp             AWS::CloudFormation::Stack Fri Aug 31 2018 12:16:40 GMT-0500 (CDT) Parameters: [MutationDeleteTodoResponse, QueryGetTodoResponse, MutationUpdateTodoResponse, QueryListTodosResponse, MutationUpdateTodoRequest, QueryGetTodoRequest, QueryListTodosRequest, MutationCreateTodoResponse, MutationCreateTodoRequest, MutationDeleteTodoRequest] do not exist in the template
UPDATE_ROLLBACK_IN_PROGRESS                  myapp-20180830150843 AWS::CloudFormation::Stack Fri Aug 31 2018 12:16:41 GMT-0500 (CDT) The following resource(s) failed to update: [apimyapp].                                                                                                                                                                                                                                                 
UPDATE_COMPLETE                              apimyapp             AWS::CloudFormation::Stack Fri Aug 31 2018 12:16:45 GMT-0500 (CDT)                                                                                                                                                                                                                                                                                                         
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS myapp-20180830150843 AWS::CloudFormation::Stack Fri Aug 31 2018 12:16:46 GMT-0500 (CDT)                                                                                                                                                                                                                                                                                                         
ā § Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS       apimyapp             AWS::CloudFormation::Stack Fri Aug 31 2018 12:16:47 GMT-0500 (CDT) 
UPDATE_COMPLETE          apimyapp             AWS::CloudFormation::Stack Fri Aug 31 2018 12:16:47 GMT-0500 (CDT) 
UPDATE_ROLLBACK_COMPLETE myapp-20180830150843 AWS::CloudFormation::Stack Fri Aug 31 2018 12:16:48 GMT-0500 (CDT) 
ā ¦ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete

Please advise, I would really like to use this in my current project.

@rygo6 Could you confirm which version of the CLI you’re using? ā€˜amplify -v’ would give you the version.

@rygo6. Could you tell me how your schem.graphql looks like which is present in amplify/backend/api/myapp/

@kaustavghosh06

ryan@ryan-ubuntu:~/Developer/my-app$ amplify -v
0.1.15

amplify/backend/api/myapp/schema.graphql

type Blog @model {
  id: ID!
  name: String!
  posts: [Post] @connection(name: "BlogPosts")
}

type Post @model {
  id: ID!
  title: String!
  blog: Blog @connection(name: "BlogPosts")
  comments: [Comment] @connection(name: "PostComments")
}

type Comment @model {
  id: ID!
  content: String
  post: Post @connection(name: "PostComments")
}

@rygo6 I was able to reproduce it.
So from your amplify/backend/api/myapp/parameters.json file remove all entries except the "AppSyncApiName" key.
So your parameters.json should look something like this:

{
    "AppSyncApiName": "myapp"
}

After this do an ampify push. I'm working on a fix for this, but you'll be able to push your graphql API by following the above-mentioned steps in the meanwhile.

This issue should be resolved with the CLI version - 0.1.16.

I'm following this tutorial : https://docs.aws.amazon.com/aws-mobile/latest/developerguide/add-aws-mobile-cloud-logic.html

it failed at the following:

ā ™ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete

I've confirmed my CLI version is 1.16.12, and I am still getting the same error. And this thread seems to be the only one addressing the issue. Could someone please post an update? thanks.

I'm also getting this error when running amplify push after a schema update. I'm using amplify-cli version 0.1.19.

same error with 0.1.22

And also with 0.1.23

same error today with 0.1.18

I am having the same error with 0.1.23: Resource is not in the state stackUpdateComplete

Following the GraphQL Transformer Tutorial
within an Angular 6 project on OSX 10.13.6 I did the following...

amplify init

amplify add auth
# default auth

amplify add api
? I selected the graphql option.
? When asked for a schema I choose **No**.
? I selected one of the default samples. 
? I choose to edit the schema and it opened the schema.graphql in my editor.
? I made some changes to the schema.
? I saved the file and choose Enter on the command line.
? I am **NOT** asked if I want to use my own Amazon DynamoDB tables
# The last ? Press enter to continue always gets skipped at the end and I cannot prevent it

amplify push
? you want to generate code for your newly created GraphQL API: **Yes**
? Enter the file name pattern of graphql queries, mutations and subscriptions: **src/graphql/**/*.js**
? Choose the code generation language target: **typescript**
? Enter the file name for the generated code: **src/API.ts**
? Do you want to generate/update all possible GraphQL operations - queries, mutations and subscriptions: **Yes**

The logs consist of a lot of creating of resources but I noticed this error: Template error: IAM role driansizzapp-20180924234637-unauthRole doesn't exist I grabbed a few lines before and after. It looks like it begins to DELETE all resources it just created which someone said are still experimental.

CREATE_IN_PROGRESS ListModifierGroupResolver                               AWS::AppSync::Resolver     Tue Sep 25 2018 21:32:23 GMT-0400 (EDT)
CREATE_COMPLETE    ItemGroupmodifiersResolver                              AWS::AppSync::Resolver     Tue Sep 25 2018 21:32:27 GMT-0400 (EDT)
CREATE_COMPLETE    driansizzapp-20180924234637-apimuchogusto-15ULFWUXWKENS AWS::CloudFormation::Stack Tue Sep 25 2018 21:32:30 GMT-0400 (EDT)
ā “ Updating resources in the cloud. This may take a few minutes...

CREATE_COMPLETE             apimuchogusto               AWS::CloudFormation::Stack Tue Sep 25 2018 21:32:36 GMT-0400 (EDT)
UPDATE_ROLLBACK_IN_PROGRESS driansizzapp-20180924234637 AWS::CloudFormation::Stack Tue Sep 25 2018 21:32:38 GMT-0400 (EDT) Template error: IAM role driansizzapp-20180924234637-unauthRole doesn't exist
ā ¦ Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS driansizzapp-20180924234637 AWS::CloudFormation::Stack Tue Sep 25 2018 21:32:50 GMT-0400 (EDT)
DELETE_IN_PROGRESS                           apimuchogusto               AWS::CloudFormation::Stack Tue Sep 25 2018 21:32:51 GMT-0400 (EDT)
ā ¦ Updating resources in the cloud. This may take a few minutes...

DELETE_IN_PROGRESS GetModifierGroupResolver                                AWS::AppSync::Resolver     Tue Sep 25 2018 21:32:55 GMT-0400 (EDT)
DELETE_IN_PROGRESS driansizzapp-20180924234637-apimuchogusto-15ULFWUXWKENS AWS::CloudFormation::Stack Tue Sep 25 2018 21:32:52 GMT-0400 (EDT) User Initiated
DELETE_IN_PROGRESS GraphQLAPIKey                                           AWS::AppSync::ApiKey       Tue Sep 25 2018 21:32:55 GMT-0400 (EDT)
DELETE_COMPLETE    ModifierGroupitemGroupResolver                          AWS::AppSync::Resolver     Tue Sep 25 2018 21:32:57 GMT-0400 (EDT)
DELETE_COMPLETE    DeleteModifierResolver                                  AWS::AppSync::Resolver     Tue Sep 25 2018 21:32:57 GMT-0400 (EDT)
DELETE_COMPLETE    ItemitemGroupResolver                                   AWS::AppSync::Resolver     Tue Sep 25 2018 21:32:57 GMT-0400 (EDT)
DELETE_COMPLETE    ItemGroupitemsResolver                                  AWS::AppSync::Resolver     Tue Sep 25 2018 21:32:56 GMT-0400 (EDT)
DELETE_COMPLETE    DeleteItemResolver                                      AWS::AppSync::Resolver     Tue Sep 25 2018 21:32:56 GMT-0400 (EDT)
DELETE_COMPLETE    GetModifierGroupResolver                                AWS::AppSync::Resolver     Tue Sep 25 2018 21:32:56 GMT-0400 (EDT)
DELETE_COMPLETE    ListModifierResolver                                    AWS::AppSync::Resolver     Tue Sep 25 2018 21:32:56 GMT-0400 (EDT)

It ends with the following...

DELETE_COMPLETE          authcognito0d92e4b9         AWS::CloudFormation::Stack Tue Sep 25 2018 21:35:02 GMT-0400 (EDT)
UPDATE_ROLLBACK_COMPLETE driansizzapp-20180924234637 AWS::CloudFormation::Stack Tue Sep 25 2018 21:35:03 GMT-0400 (EDT)
ā ¼ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete

Would be great if everyone could provide a screenshot of the logs or just paste the logs out here for us to narrow down the issue - along with the OS used.

For me this happens when pushing the same project first from the Linux subsystem in Windows (using Ubuntu), and then from a new Ubuntu 18.04.1 install. I don't know if that's related. Amplify version is 0.1.26.

I tried removing everything except AppSyncApiName from amplify/backend/api/myapp/parameters.json, that didn't help.

Here are the logs:

amplify push
| Category | Resource name   | Operation | Provider plugin   |
| -------- | --------------- | --------- | ----------------- |
| Api      | xxxxxxxxxxxxx   | Update    | awscloudformation |
| Auth     | yyyyyyyyyyyyyyy | No Change | awscloudformation |
? Are you sure you want to continue? true
? Do you want to update code for your updated GraphQL API (Y/n)
? Do you want to update code for your updated GraphQL API Yes
? Do you want to generate GraphQL statements (queries, mutations and subscription) based on your schema types? This will overwrite your current graphql queries, mutations and subscriptions (Y/n)
? Do you want to generate GraphQL statements (queries, mutations and subscription) based on your schema types? This will overwrite your current graphql queries, mutations and subscriptions Yes
ā “ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS          xxxxxxxxxxxxx-20180922180831 AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:30 GMT+0200 (CEST) User Initiated
UPDATE_IN_PROGRESS          authyyyyyyyyyyyyyyy          AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:33 GMT+0200 (CEST)
UPDATE_IN_PROGRESS          apixxxxxxxxxxxxx             AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:33 GMT+0200 (CEST)
UPDATE_FAILED               authyyyyyyyyyyyyyyy          AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:34 GMT+0200 (CEST) Parameters: [authRoleArn, autoVerifiedAttributes, allowUnauthenticatedIdentities, smsVerificationMessage, userpoolClientReadAttributes, mfaTypes, emailVerificationSubject, useDefault, openIdLambdaIAMPolicy, userpoolClientGenerateSecret, mfaConfiguration, userpoolClientLogPolicy, openIdRolePolicy, identityPoolName, openIdLogPolicy, thirdPartyAuth, authSelections, smsAuthenticationMessage, roleExternalId, mfaLambdaLogPolicy, passwordPolicyMinLength, userPoolName,openIdLambdaRoleName, policyName, userpoolClientName, userpoolClientLambdaPolicy, resourceName, mfaLambdaIAMPolicy, mfaPassRolePolicy, emailVerificationMessage, userpoolClientRefreshTokenValidity,userpoolClientSetAttributes, unAuthRoleName, authRoleName, requiredAttributes, roleName, passwordPolicyCharacters, lambdaLogPolicy, unAuthRoleArn, userpoolClientLambdaRole, defaultPasswordPolicy, mfaLambdaRole] must have values
UPDATE_FAILED               apixxxxxxxxxxxxx             AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:34 GMT+0200 (CEST) Parameters: [ResolverBucket, ResolverRootKey, DeploymentTimestamp, schemaGraphql] must have values
UPDATE_ROLLBACK_IN_PROGRESS xxxxxxxxxxxxx-20180922180831 AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:35 GMT+0200 (CEST) The following resource(s) failed to update: [apixxxxxxxxxxxxx, authyyyyyyyyyyyyyyy].
UPDATE_COMPLETE             authyyyyyyyyyyyyyyy          AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:39 GMT+0200 (CEST)
UPDATE_COMPLETE             apixxxxxxxxxxxxx             AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:39 GMT+0200 (CEST)
ā § Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS xxxxxxxxxxxxx-20180922180831 AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:40 GMT+0200 (CEST)
ā ø Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS       apixxxxxxxxxxxxx             AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:41 GMT+0200 (CEST)
UPDATE_COMPLETE          apixxxxxxxxxxxxx             AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:42 GMT+0200 (CEST)
UPDATE_IN_PROGRESS       authyyyyyyyyyyyyyyy          AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:43 GMT+0200 (CEST)
UPDATE_COMPLETE          authyyyyyyyyyyyyyyy          AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:43 GMT+0200 (CEST)
UPDATE_ROLLBACK_COMPLETE xxxxxxxxxxxxx-20180922180831 AWS::CloudFormation::Stack Tue Oct 02 2018 10:18:43 GMT+0200 (CEST)
ā “ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete

I got this error when trying to add auth with a Google web app ID. I think the ID Google gave me exceeded the constraints

failed to satisfy constraint: Map value must satisfy constraint: [Member must have length less than or equal to 128, Member must have length greater than or equal to 1, Member must satisfy regular expression pattern: [\w.;_/-]+] (Service: AmazonCognitoIdentity; Status Code: 400; Error Code: ValidationException; Request ID: 4f34a3e6-cc2b-11e8-afe5-af342c13d093)

skipped the 3rd party Auth and push succeeded

same problem for me, lots of CREATE_FAILED logs, "Resource is not in the state stackUpdateComplete" at the end. Ubuntu 18.04, cli 0.1.27

Edit: oh and I got this by stricly following the setup instructions here: https://github.com/aws-samples/aws-amplify-vue

I ran amplify delete, then tried to start over and now I get this error after adding auth and pushing it.

āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete

FYI the only way I could get rid of this message was to delete aws-amplify from my project then delete the global npm package @aws-amplify/cli. I then reinstalled @aws-amplify/cli, ran amplify configure, then amplify init in my project. Once I added auth I was able to push it again.

Having the same issue. Here are my logs:

$ amplify push
| Category | Resource name   | Operation | Provider plugin   |
| -------- | --------------- | --------- | ----------------- |
| Api      | XXXXXXXXXXXX    | Update    | awscloudformation |
| Auth     | XXXXXXXXXXXX    | No Change | awscloudformation |
| Storage  | XXXXXXXXXXXX    | No Change | awscloudformation |
? Are you sure you want to continue? true


GraphQL schema compiled successfully. Edit your schema at /Users/mdahlke/Sites/websites/amplify/vue-sample-app/app/amplify/backend/api/vuesampleapp/schema.graphql
ā ø Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS          XXXXXXXXXXXX AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:00 GMT-0500 (Central Daylight Time) User Initiated                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
UPDATE_IN_PROGRESS          storageXXXXXXX           AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:04 GMT-0500 (Central Daylight Time)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
UPDATE_FAILED               storageXXXXXXX           AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:05 GMT-0500 (Central Daylight Time) Parameters: [bucketName, unauthPolicyName, authRoleName, unauthRoleName, unauthPermissions, authPolicyName, authPermissions] must have values                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
UPDATE_IN_PROGRESS          authXXXXXXX         AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:05 GMT-0500 (Central Daylight Time)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
UPDATE_FAILED               authXXXXXXX         AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:05 GMT-0500 (Central Daylight Time) Parameters: [authRoleArn, autoVerifiedAttributes, allowUnauthenticatedIdentities, smsVerificationMessage, userpoolClientReadAttributes, mfaTypes, emailVerificationSubject, useDefault, openIdLambdaIAMPolicy, userpoolClientGenerateSecret, mfaConfiguration, userpoolClientLogPolicy, openIdRolePolicy, identityPoolName, openIdLogPolicy, thirdPartyAuth, authSelections, smsAuthenticationMessage, roleExternalId, mfaLambdaLogPolicy, passwordPolicyMinLength, userPoolName, openIdLambdaRoleName, policyName, userpoolClientName, userpoolClientLambdaPolicy, resourceName, mfaLambdaIAMPolicy, mfaPassRolePolicy, emailVerificationMessage, userpoolClientRefreshTokenValidity, userpoolClientSetAttributes, unAuthRoleName, authRoleName, requiredAttributes, roleName, passwordPolicyCharacters, lambdaLogPolicy, unAuthRoleArn, userpoolClientLambdaRole, defaultPasswordPolicy, mfaLambdaRole] must have values
UPDATE_ROLLBACK_IN_PROGRESS XXXXXXXXXXXX AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:06 GMT-0500 (Central Daylight Time) The following resource(s) failed to update: [storageXXXXXXX, authXXXXXXX].                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
ā ¼ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE                              storageXXXXXXX           AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:11 GMT-0500 (Central Daylight Time) 
UPDATE_COMPLETE                              authXXXXXXX         AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:11 GMT-0500 (Central Daylight Time) 
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS XXXXXXXXXXXX AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:12 GMT-0500 (Central Daylight Time) 
UPDATE_IN_PROGRESS                           storageXXXXXXX           AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:13 GMT-0500 (Central Daylight Time) 
UPDATE_IN_PROGRESS                           authXXXXXXX         AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:13 GMT-0500 (Central Daylight Time) 
UPDATE_COMPLETE                              storageXXXXXXX           AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:13 GMT-0500 (Central Daylight Time) 
UPDATE_COMPLETE                              authXXXXXXX         AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:13 GMT-0500 (Central Daylight Time) 
UPDATE_ROLLBACK_COMPLETE                     XXXXXXXXXXXX AWS::CloudFormation::Stack Sun Oct 14 2018 16:24:14 GMT-0500 (Central Daylight Time) 
ā ¼ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete

Same issue here. Log looks as follows. Please advise, this issue is blocking my project ...

Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS tenerifeonlineadmin-20181014173936 AWS::CloudFormation::Stack Tue Oct 16 2018 19:13:19 GMT+0100 (WEST) User Initiated
UPDATE_IN_PROGRESS authcognitoedc34406                AWS::CloudFormation::Stack Tue Oct 16 2018 19:13:23 GMT+0100 (WEST)
UPDATE_COMPLETE    authcognitoedc34406                AWS::CloudFormation::Stack Tue Oct 16 2018 19:13:23 GMT+0100 (WEST)
UPDATE_IN_PROGRESS apitenerifeonlineadmin             AWS::CloudFormation::Stack Tue Oct 16 2018 19:13:26 GMT+0100 (WEST)
ā  Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS tenerifeonlineadmin-20181014173936-apitenerifeonlineadmin-Q0QKXOMB1VRO AWS::CloudFormation::Stack Tue Oct 16 2018 19:13:26 GMT+0100 (WEST) User Initiated
ā “ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS          PropertyTable                                                          AWS::DynamoDB::Table        Tue Oct 16 2018 19:13:34 GMT+0100 (WEST)
UPDATE_IN_PROGRESS          GraphQLSchema                                                          AWS::AppSync::GraphQLSchema Tue Oct 16 2018 19:13:34 GMT+0100 (WEST)
UPDATE_IN_PROGRESS          ImgTable                                                               AWS::DynamoDB::Table        Tue Oct 16 2018 19:13:34 GMT+0100 (WEST)
UPDATE_FAILED               PropertyTable                                                          AWS::DynamoDB::Table        Tue Oct 16 2018 19:13:34 GMT+0100 (WEST) Attempting to create an index which already exists (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ValidationException; Request ID: R8CFAE5RLQVHLQIDI03E57JGCJVV4KQNSO5AEMVJF66Q9ASUAAJG)
UPDATE_FAILED               ImgTable                                                               AWS::DynamoDB::Table        Tue Oct 16 2018 19:13:34 GMT+0100 (WEST) Cannot perform more than one GSI creation or deletion in a single update
UPDATE_FAILED               GraphQLSchema                                                          AWS::AppSync::GraphQLSchema Tue Oct 16 2018 19:13:35 GMT+0100 (WEST) Resource update cancelled
UPDATE_ROLLBACK_IN_PROGRESS tenerifeonlineadmin-20181014173936-apitenerifeonlineadmin-Q0QKXOMB1VRO AWS::CloudFormation::Stack  Tue Oct 16 2018 19:13:36 GMT+0100 (WEST) The following resource(s) failed to update: [ImgTable, GraphQLSchema, PropertyTable].
UPDATE_FAILED               apitenerifeonlineadmin                                                 AWS::CloudFormation::Stack  Tue Oct 16 2018 19:13:37 GMT+0100 (WEST) Embedded stack arn:aws:cloudformation:eu-central-1:645867932780:stack/tenerifeonlineadmin-20181014173936-apitenerifeonlineadmin-Q0QKXOMB1VRO/2b0a38a0-d127-11e8-919d-503f2ad2e59a was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESSwith reason: The following resource(s) failed to update: [ImgTable, GraphQLSchema, PropertyTable].
UPDATE_ROLLBACK_IN_PROGRESS tenerifeonlineadmin-20181014173936                                     AWS::CloudFormation::Stack  Tue Oct 16 2018 19:13:38 GMT+0100 (WEST) The following resource(s) failed to update: [apitenerifeonlineadmin].
ā ø Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS authcognitoedc34406    AWS::CloudFormation::Stack Tue Oct 16 2018 19:13:46 GMT+0100 (WEST)
UPDATE_COMPLETE    authcognitoedc34406    AWS::CloudFormation::Stack Tue Oct 16 2018 19:13:47 GMT+0100 (WEST)
UPDATE_IN_PROGRESS apitenerifeonlineadmin AWS::CloudFormation::Stack Tue Oct 16 2018 19:13:48 GMT+0100 (WEST)
ā ø Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE PropertyTable AWS::DynamoDB::Table        Tue Oct 16 2018 19:14:08 GMT+0100 (WEST)
UPDATE_COMPLETE GraphQLSchema AWS::AppSync::GraphQLSchema Tue Oct 16 2018 19:14:08 GMT+0100 (WEST)
UPDATE_COMPLETE ImgTable      AWS::DynamoDB::Table        Tue Oct 16 2018 19:14:08 GMT+0100 (WEST)
ā ¹ Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS tenerifeonlineadmin-20181014173936-apitenerifeonlineadmin-Q0QKXOMB1VRO AWS::CloudFormation::Stack Tue Oct 16 2018 19:14:12 GMT+0100 (WEST)
ā “ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE                              apitenerifeonlineadmin                                                 AWS::CloudFormation::Stack Tue Oct 16 2018 19:14:22 GMT+0100 (WEST)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS tenerifeonlineadmin-20181014173936                                     AWS::CloudFormation::Stack Tue Oct 16 2018 19:14:23 GMT+0100 (WEST)
UPDATE_IN_PROGRESS                           apitenerifeonlineadmin                                                 AWS::CloudFormation::Stack Tue Oct 16 2018 19:14:24 GMT+0100 (WEST)
UPDATE_ROLLBACK_COMPLETE                     tenerifeonlineadmin-20181014173936-apitenerifeonlineadmin-Q0QKXOMB1VRO AWS::CloudFormation::Stack Tue Oct 16 2018 19:14:25 GMT+0100 (WEST)
ā ‹ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE          apitenerifeonlineadmin             AWS::CloudFormation::Stack Tue Oct 16 2018 19:14:35 GMT+0100 (WEST)
UPDATE_IN_PROGRESS       authcognitoedc34406                AWS::CloudFormation::Stack Tue Oct 16 2018 19:14:36 GMT+0100 (WEST)
UPDATE_COMPLETE          authcognitoedc34406                AWS::CloudFormation::Stack Tue Oct 16 2018 19:14:36 GMT+0100 (WEST)
UPDATE_ROLLBACK_COMPLETE tenerifeonlineadmin-20181014173936 AWS::CloudFormation::Stack Tue Oct 16 2018 19:14:36 GMT+0100 (WEST)
ā ¹ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete

I've been having the same issue. It seems in my case that changing the schema definition fixed the problem. This did not work:

type Product @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  name: String!
  price: Float!
  vendor: String
  category: String
  units: String
  defaultqty: Int
  maxqty: Int
}

type Order @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  products: [Product!]!
}

But this did (added name field to the Order type):

type Product @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  name: String!
  price: Float!
  vendor: String
  category: String
  units: String
  defaultqty: Int
  maxqty: Int
}

type Order @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  name: String
  products: [Product!]!
}

Any ideas why?

@mdahlke Can you run amplify update auth -> Yes, use default configurations and then amplify push? That should hopefully resolve your issue.

@tenerifeonline can I take a look at your schema?

@kaustavghosh06, @tenerifeonline asked me to let you know that due to project pressure he was forced back to firestore for the current project. He will be watching amplify-cli closely going forward and plans to use it in a future project as it looks extremely promising, keep up the good work. Unfortunately, he lost his graphql schema because the "amplify delete" command removed the schema file and he has currently no time to recreate that file.
P.S. It would be great if "amplify delete" would not automatically delete the schema and leave the graphql schema file in the amplify directory.

@michaelcaterisano The issue is that when trying to generate the CreateOrderInput type, there are no valid fields because "id" is stripped away as it is generated on the server and the connection field will not generate a field either. Adding the scalar field makes it work because it has a valid input field again. The fix is to add a check here (https://github.com/aws-amplify/amplify-cli/blob/master/packages/graphql-dynamodb-transformer/src/DynamoDBModelTransformer.ts#L145) that makes sure each input types has at least one field and if it does not, do not generate that input type or the corresponding mutation field.

This will be fixed as soon as I can get to it which should be in the next few days.

Got it, that makes sense. Thanks @mikeparisstuff!

Now trying the following schema and getting the same error. Will post the stack trace also. Consistently seeing "Cannot perform more than one GSI creation or deletion in a single update" in the trace.

type Vendor @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  name: String!
}

type Product @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  name: String!
  price: Float!
  vendor: Vendor @connection
  category: String
  units: String
  defaultqty: Int
  maxqty: Int
}

type Order @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  name: String
  products: [Product]
}

And stack trace.

UPDATE_IN_PROGRESS tampoporeactamplify-20181018104010 AWS::CloudFormation::Stack Tue Oct23 2018 00:42:12 GMT-0400 (Eastern Daylight Time) User Initiated
UPDATE_IN_PROGRESS authcognito2f0d4060                AWS::CloudFormation::Stack Tue Oct23 2018 00:42:16 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS hostingS3AndCloudFront             AWS::CloudFormation::Stack Tue Oct23 2018 00:42:16 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE    authcognito2f0d4060                AWS::CloudFormation::Stack Tue Oct23 2018 00:42:17 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE    hostingS3AndCloudFront             AWS::CloudFormation::Stack Tue Oct23 2018 00:42:17 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS apitampopoapi                      AWS::CloudFormation::Stack Tue Oct23 2018 00:42:19 GMT-0400 (Eastern Daylight Time)
ā ‹ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS tampoporeactamplify-20181018104010-apitampopoapi-1VC62R58TY2UH AWS::CloudFormation::Stack Tue Oct 23 2018 00:42:20 GMT-0400 (Eastern Daylight Time) User Initiated
ā ¹ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS          GraphQLSchema  AWS::AppSync::GraphQLSchema Tue Oct 23 2018 00:42:28 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS          ProductTable  AWS::DynamoDB::Table        Tue Oct 23 2018 00:42:28 GMT-0400 (Eastern Daylight Time)
UPDATE_FAILED               ProductTable  AWS::DynamoDB::Table        Tue Oct 23 2018 00:42:28 GMT-0400 (Eastern Daylight Time) Cannot perform more than one GSI creation or deletion in a single update
UPDATE_FAILED               GraphQLSchema  AWS::AppSync::GraphQLSchema Tue Oct 23 2018 00:42:29 GMT-0400 (Eastern Daylight Time) Resource update cancelled
UPDATE_ROLLBACK_IN_PROGRESS tampoporeactamplify-20181018104010-apitampopoapi-1VC62R58TY2UH AWS::CloudFormation::Stack  Tue Oct 23 2018 00:42:30 GMT-0400 (Eastern Daylight Time) The following resource(s) failed to update: [ProductTable, GraphQLSchema].
UPDATE_FAILED               apitampopoapi  AWS::CloudFormation::Stack  Tue Oct 23 2018 00:42:31 GMT-0400 (Eastern Daylight Time) Embedded stack arn:aws:cloudformation:us-east-1:175773093744:stack/tampoporeactamplify-20181018104010-apitampopoapi-1VC62R58TY2UH/4cd15b60-d2e6-11e8-85d3-50faeaee4499 was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to update: [ProductTable, GraphQLSchema].
UPDATE_ROLLBACK_IN_PROGRESS tampoporeactamplify-20181018104010  AWS::CloudFormation::Stack  Tue Oct 23 2018 00:42:32 GMT-0400 (Eastern Daylight Time) The following resource(s) failed to update: [apitampopoapi].
ā ø Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS hostingS3AndCloudFront AWS::CloudFormation::Stack Tue Oct 23 2018 00:42:43 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS authcognito2f0d4060    AWS::CloudFormation::Stack Tue Oct 23 2018 00:42:44 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE    hostingS3AndCloudFront AWS::CloudFormation::Stack Tue Oct 23 2018 00:42:44 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE    authcognito2f0d4060    AWS::CloudFormation::Stack Tue Oct 23 2018 00:42:44 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS apitampopoapi          AWS::CloudFormation::Stack Tue Oct 23 2018 00:42:45 GMT-0400 (Eastern Daylight Time)
ā ¼ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE                              ProductTable                   AWS::DynamoDB::Table        Tue Oct 23 2018 00:43:13 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE                              GraphQLSchema                   AWS::AppSync::GraphQLSchema Tue Oct 23 2018 00:43:14 GMT-0400 (Eastern Daylight Time)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS tampoporeactamplify-20181018104010-apitampopoapi-1VC62R58TY2UH AWS::CloudFormation::Stack  Tue Oct 23 2018 00:43:19 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE                              apitampopoapi                   AWS::CloudFormation::Stack  Tue Oct 23 2018 00:43:20 GMT-0400 (Eastern Daylight Time)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS tampoporeactamplify-20181018104010                   AWS::CloudFormation::Stack  Tue Oct 23 2018 00:43:20 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS                           apitampopoapi                   AWS::CloudFormation::Stack  Tue Oct 23 2018 00:43:22 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS                           hostingS3AndCloudFront                   AWS::CloudFormation::Stack  Tue Oct 23 2018 00:43:22 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE                              hostingS3AndCloudFront                   AWS::CloudFormation::Stack  Tue Oct 23 2018 00:43:22 GMT-0400 (Eastern Daylight Time)
ā ‹ Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_COMPLETE tampoporeactamplify-20181018104010-apitampopoapi-1VC62R58TY2UH AWS::CloudFormation::Stack Tue Oct 23 2018 00:43:23 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE          apitampopoapi                                                  AWS::CloudFormation::Stack Tue Oct 23 2018 00:43:32 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS       authcognito2f0d4060                                            AWS::CloudFormation::Stack Tue Oct 23 2018 00:43:33 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE          authcognito2f0d4060                                            AWS::CloudFormation::Stack Tue Oct 23 2018 00:43:34 GMT-0400 (Eastern Daylight Time)
UPDATE_ROLLBACK_COMPLETE tampoporeactamplify-20181018104010                             AWS::CloudFormation::Stack Tue Oct 23 2018 00:43:34 GMT-0400 (Eastern Daylight Time)
ā ‡ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete

I think I may have realized the issue. Once I add a @connection directive, it seems that it's not possible to remove it and then amplify push again. This seems to be because adding a @connection adds a GSI, which seems impossible to remove after adding. Is there a workaround for this? So far I've just had to amplify delete and start over when making changes to @connection directives.

@michaelcaterisano How many [pairs of] @connection fields were you tweaking in the single update? I believe the issue only occurs when making changes that result in more than 1 GSI create/update/delete on a single table. In the short term, you can get around this issue by breaking up the push into multiple steps where you only change 1 connection at a time. In the long term, I think we can get around these issues with tooling that warns you or, even better, that automatically breaks up the push into multiple steps. I will also take an action item to document this in the amplify docs.

E.G. The CLI works when going from:

type Meeting @model {
  id: ID!
  name: String!
  room: Room @connection(name: "RoomMeetings")
}

type Room @model {
  id: ID!
  number: Int!
  meetings: [Meeting] @connection(name: "RoomMeetings")
}

to:

type Meeting @model {
  id: ID!
  name: String!
}

type Room @model {
  id: ID!
  number: Int!
}

It also works when going from:

type Meeting @model {
  id: ID!
  name: String!
  room: Room @connection
}

to:

type Meeting @model {
  id: ID!
  name: String!
}

I noticed that it does fail when trying to add multiple connections to a model type in a single push and the reason is that DynamoDB has a limit on the number of GSIs on a single table that you can touch in a single CloudFormation update stack invocation.

E.G. When trying to go from:

type Meeting @model {
  id: ID!
  name: String!
}

type Room @model {
  id: ID!
  number: Int!
}

to:

type Meeting @model {
  id: ID!
  name: String!

  # Both of these connections will try to create GSIs on the Meeting table.
  room: Room @connection(name: "RoomMeetings")
  backupRoom: Room @connection(name: "BackupMeetings")
}

type Room @model {
  id: ID!
  number: Int!

  # Uses the same two GSIs on the Meeting table.
  meetings: [Meeting] @connection(name: "RoomMeetings")
  backupMeetings: [Meeting] @connection(name: "BackupMeetings")
}

will fail with the error

Cannot perform more than one GSI creation or deletion in a single update

We are working on bypassing a number of CloudFormation & other service related limits but for now, you can sidestep this issue by breaking your update into multiple steps. For example, we can get the above schema to work by first going from:

type Meeting @model {
  id: ID!
  name: String!
}

type Room @model {
  id: ID!
  number: Int!
}

to:

type Meeting @model {
  id: ID!
  name: String!
  room: Room @connection(name: "RoomMeetings")
}

type Room @model {
  id: ID!
  number: Int!
  meetings: [Meeting] @connection(name: "RoomMeetings")
}

and then to:

type Meeting @model {
  id: ID!
  name: String!
  room: Room @connection(name: "RoomMeetings")
  backupRoom: Room @connection(name: "BackupMeetings")
}

type Room @model {
  id: ID!
  number: Int!
  meetings: [Meeting] @connection(name: "RoomMeetings")
  backupMeetings: [Meeting] @connection(name: "BackupMeetings")
}

Excellent, thanks!

@mikeparisstuff thx for the update. I made some material changes to my schema (removed several connection references) and adding them back and then making several updates doesn't seem practical because I've made other code changes based on the new schema changes. When I went into my S3 bucket and it seemed stuff has updated (updatedAt time changed). Am I stuck until your fix comes in? Best to just delete and re-start?

Also, I'm still trying to figure out how to keep my local resources in sync with changes made in the console. For example, my schema.graphql is different in local amplify/backend/api/<apiname>/schema.graphql and the version in the AWS console. How do I update the local to keep them in sync so when I push it doesn't overwrite my changes? When I update the files in amplify/backend/api/<apiname>/build/schema.graphql it gets overridden when I do amplify push.

I've to solve the issue like @mikeparisstuff mentioned, but this didn't worked for me.
What solved my Problem was to reset the "Read/write capacity mode" back to "On-demand", then amplify push worked.

I have faced the same issue and it was caused by changing the project's route or name. To solve it open amplify/.config/project-config.json and check projectPath

Possibly caused by use of experimental amplify delete feature in project directory prior to re-running amplify init.

@haverchuck If we face like this issue in production, amplify delete will delete all tables and data, right ? so what is safer way to use delete in production ?

Please install npm i -g @aws-amplify/cli and you will not have any issue

I have this issue too.

my log

ryan@ryan-ubuntu:~/Developer/myappclone$ amplify push
| Category | Resource name | Operation | Provider plugin   |
| -------- | ------------- | --------- | ----------------- |
| Api      | myapp         | Update    | awscloudformation |
? Are you sure you want to continue? true
ā ‹ Updating resources in the cloud. This may take a few minutes...
GraphQL schema compiled successfully. Edit your schema at /home/ryan/Developer/myappclone/amplify/backend/api/myapp/schema.graphql
ā ¦ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS          myapp-20180830150843 AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:36 GMT-0500 (CDT) User Initiated                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
UPDATE_IN_PROGRESS          apimyapp             AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:40 GMT-0500 (CDT)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
UPDATE_FAILED               apimyapp             AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:40 GMT-0500 (CDT) Parameters: [MutationDeletePostResponse, MutationDeleteBlogResponse, QueryListCommentsResponse, MutationDeleteBlogRequest, MutationUpdateCommentRequest, PostBlogResponse, MutationCreatePostRequest, QueryGetCommentRequest, MutationUpdatePostRequest, MutationDeleteCommentRequest, CommentPostRequest, QueryListBlogsResponse, MutationUpdateCommentResponse, PostCommentsResponse, MutationCreatePostResponse, QueryGetBlogResponse, MutationCreateBlogResponse, QueryGetPostResponse, MutationCreateCommentRequest, CommentPostResponse, MutationUpdatePostResponse, QueryGetCommentResponse, MutationUpdateBlogResponse, MutationDeletePostRequest, QueryGetBlogRequest, QueryListPostsResponse, QueryListCommentsRequest, BlogPostsResponse, MutationCreateBlogRequest, BlogPostsRequest, QueryGetPostRequest, MutationUpdateBlogRequest, PostBlogRequest, MutationCreateCommentResponse, QueryListPostsRequest, QueryListBlogsRequest, MutationDeleteCommentResponse, PostCommentsRequest] must have values
UPDATE_ROLLBACK_IN_PROGRESS myapp-20180830150843 AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:41 GMT-0500 (CDT) The following resource(s) failed to update: [apimyapp].                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
ā ™ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE                              apimyapp             AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:50 GMT-0500 (CDT) 
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS myapp-20180830150843 AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:50 GMT-0500 (CDT) 
UPDATE_IN_PROGRESS                           apimyapp             AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:51 GMT-0500 (CDT) 
UPDATE_COMPLETE                              apimyapp             AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:52 GMT-0500 (CDT) 
UPDATE_ROLLBACK_COMPLETE                     myapp-20180830150843 AWS::CloudFormation::Stack Thu Aug 30 2018 16:35:52 GMT-0500 (CDT) 
ā § Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete

Please install npm i -g @aws-amplify/cli and you will not have any issue

Now trying the following schema and getting the same error. Will post the stack trace also. Consistently seeing "Cannot perform more than one GSI creation or deletion in a single update" in the trace.

type Vendor @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  name: String!
}

type Product @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  name: String!
  price: Float!
  vendor: Vendor @connection
  category: String
  units: String
  defaultqty: Int
  maxqty: Int
}

type Order @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  name: String
  products: [Product]
}

And stack trace.

UPDATE_IN_PROGRESS tampoporeactamplify-20181018104010 AWS::CloudFormation::Stack Tue Oct23 2018 00:42:12 GMT-0400 (Eastern Daylight Time) User Initiated
UPDATE_IN_PROGRESS authcognito2f0d4060                AWS::CloudFormation::Stack Tue Oct23 2018 00:42:16 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS hostingS3AndCloudFront             AWS::CloudFormation::Stack Tue Oct23 2018 00:42:16 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE    authcognito2f0d4060                AWS::CloudFormation::Stack Tue Oct23 2018 00:42:17 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE    hostingS3AndCloudFront             AWS::CloudFormation::Stack Tue Oct23 2018 00:42:17 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS apitampopoapi                      AWS::CloudFormation::Stack Tue Oct23 2018 00:42:19 GMT-0400 (Eastern Daylight Time)
ā ‹ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS tampoporeactamplify-20181018104010-apitampopoapi-1VC62R58TY2UH AWS::CloudFormation::Stack Tue Oct 23 2018 00:42:20 GMT-0400 (Eastern Daylight Time) User Initiated
ā ¹ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS          GraphQLSchema  AWS::AppSync::GraphQLSchema Tue Oct 23 2018 00:42:28 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS          ProductTable  AWS::DynamoDB::Table        Tue Oct 23 2018 00:42:28 GMT-0400 (Eastern Daylight Time)
UPDATE_FAILED               ProductTable  AWS::DynamoDB::Table        Tue Oct 23 2018 00:42:28 GMT-0400 (Eastern Daylight Time) Cannot perform more than one GSI creation or deletion in a single update
UPDATE_FAILED               GraphQLSchema  AWS::AppSync::GraphQLSchema Tue Oct 23 2018 00:42:29 GMT-0400 (Eastern Daylight Time) Resource update cancelled
UPDATE_ROLLBACK_IN_PROGRESS tampoporeactamplify-20181018104010-apitampopoapi-1VC62R58TY2UH AWS::CloudFormation::Stack  Tue Oct 23 2018 00:42:30 GMT-0400 (Eastern Daylight Time) The following resource(s) failed to update: [ProductTable, GraphQLSchema].
UPDATE_FAILED               apitampopoapi  AWS::CloudFormation::Stack  Tue Oct 23 2018 00:42:31 GMT-0400 (Eastern Daylight Time) Embedded stack arn:aws:cloudformation:us-east-1:175773093744:stack/tampoporeactamplify-20181018104010-apitampopoapi-1VC62R58TY2UH/4cd15b60-d2e6-11e8-85d3-50faeaee4499 was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to update: [ProductTable, GraphQLSchema].
UPDATE_ROLLBACK_IN_PROGRESS tampoporeactamplify-20181018104010  AWS::CloudFormation::Stack  Tue Oct 23 2018 00:42:32 GMT-0400 (Eastern Daylight Time) The following resource(s) failed to update: [apitampopoapi].
ā ø Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS hostingS3AndCloudFront AWS::CloudFormation::Stack Tue Oct 23 2018 00:42:43 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS authcognito2f0d4060    AWS::CloudFormation::Stack Tue Oct 23 2018 00:42:44 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE    hostingS3AndCloudFront AWS::CloudFormation::Stack Tue Oct 23 2018 00:42:44 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE    authcognito2f0d4060    AWS::CloudFormation::Stack Tue Oct 23 2018 00:42:44 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS apitampopoapi          AWS::CloudFormation::Stack Tue Oct 23 2018 00:42:45 GMT-0400 (Eastern Daylight Time)
ā ¼ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE                              ProductTable                   AWS::DynamoDB::Table        Tue Oct 23 2018 00:43:13 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE                              GraphQLSchema                   AWS::AppSync::GraphQLSchema Tue Oct 23 2018 00:43:14 GMT-0400 (Eastern Daylight Time)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS tampoporeactamplify-20181018104010-apitampopoapi-1VC62R58TY2UH AWS::CloudFormation::Stack  Tue Oct 23 2018 00:43:19 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE                              apitampopoapi                   AWS::CloudFormation::Stack  Tue Oct 23 2018 00:43:20 GMT-0400 (Eastern Daylight Time)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS tampoporeactamplify-20181018104010                   AWS::CloudFormation::Stack  Tue Oct 23 2018 00:43:20 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS                           apitampopoapi                   AWS::CloudFormation::Stack  Tue Oct 23 2018 00:43:22 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS                           hostingS3AndCloudFront                   AWS::CloudFormation::Stack  Tue Oct 23 2018 00:43:22 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE                              hostingS3AndCloudFront                   AWS::CloudFormation::Stack  Tue Oct 23 2018 00:43:22 GMT-0400 (Eastern Daylight Time)
ā ‹ Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_COMPLETE tampoporeactamplify-20181018104010-apitampopoapi-1VC62R58TY2UH AWS::CloudFormation::Stack Tue Oct 23 2018 00:43:23 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE          apitampopoapi                                                  AWS::CloudFormation::Stack Tue Oct 23 2018 00:43:32 GMT-0400 (Eastern Daylight Time)
UPDATE_IN_PROGRESS       authcognito2f0d4060                                            AWS::CloudFormation::Stack Tue Oct 23 2018 00:43:33 GMT-0400 (Eastern Daylight Time)
UPDATE_COMPLETE          authcognito2f0d4060                                            AWS::CloudFormation::Stack Tue Oct 23 2018 00:43:34 GMT-0400 (Eastern Daylight Time)
UPDATE_ROLLBACK_COMPLETE tampoporeactamplify-20181018104010                             AWS::CloudFormation::Stack Tue Oct 23 2018 00:43:34 GMT-0400 (Eastern Daylight Time)
ā ‡ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete

Please install npm i -g @aws-amplify/cli and you will not have any issue

like @dipjyotimetia suggested npm i -g @aws-amplify/cli worked. But after I also did:

amplify remove auth
Followed by

amplify add auth
Then amplify push didn't give any errors.

UPDATE_COMPLETE    storagehdtvstorage       AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:22 GMT-0500 (Central Daylight Time)
UPDATE_COMPLETE    functionStripeProductsFn AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:21 GMT-0500 (Central Daylight Time)
UPDATE_COMPLETE    analyticshdtvanalytics   AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:21 GMT-0500 (Central Daylight Time)
UPDATE_IN_PROGRESS storagehdtvstorage       AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:21 GMT-0500 (Central Daylight Time)
UPDATE_FAILED      authhdtvauth             AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:21 GMT-0500 (Central Daylight Time) Parameters: [resourceNameTruncated, dependsOn] must have values
UPDATE_IN_PROGRESS functionStripeProductsFn AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:21 GMT-0500 (Central Daylight Time)
UPDATE_IN_PROGRESS analyticshdtvanalytics   AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:21 GMT-0500 (Central Daylight Time)
UPDATE_IN_PROGRESS authhdtvauth             AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:21 GMT-0500 (Central Daylight Time)
UPDATE_IN_PROGRESS hdtv-prod-20190706213816 AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:17 GMT-0500 (Central Daylight Time) User Initiated
ā “ Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_IN_PROGRESS hdtv-prod-20190706213816 AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:22 GMT-0500 (Central Daylight Time) The following resource(s) failed to update: [authhdtvauth].
ā § Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE    storagehdtvstorage       AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:31 GMT-0500 (Central Daylight Time)
UPDATE_COMPLETE    analyticshdtvanalytics   AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:31 GMT-0500 (Central Daylight Time)
UPDATE_COMPLETE    functionStripeProductsFn AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:30 GMT-0500 (Central Daylight Time)
UPDATE_IN_PROGRESS storagehdtvstorage       AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:30 GMT-0500 (Central Daylight Time)
UPDATE_IN_PROGRESS analyticshdtvanalytics   AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:30 GMT-0500 (Central Daylight Time)
UPDATE_COMPLETE    authhdtvauth             AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:30 GMT-0500 (Central Daylight Time)
UPDATE_IN_PROGRESS functionStripeProductsFn AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:30 GMT-0500 (Central Daylight Time)
ā ¼ Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS hdtv-prod-20190706213816 AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:32 GMT-0500 (Central Daylight Time)
ā ø Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_COMPLETE hdtv-prod-20190706213816 AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:34 GMT-0500 (Central Daylight Time)
UPDATE_COMPLETE          functionStripeProductsFn AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:34 GMT-0500 (Central Daylight Time)
UPDATE_COMPLETE          storagehdtvstorage       AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:34 GMT-0500 (Central Daylight Time)
UPDATE_COMPLETE          authhdtvauth             AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:34 GMT-0500 (Central Daylight Time)
UPDATE_COMPLETE          analyticshdtvanalytics   AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:34 GMT-0500 (Central Daylight Time)
UPDATE_IN_PROGRESS       functionStripeProductsFn AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:33 GMT-0500 (Central Daylight Time)
UPDATE_IN_PROGRESS       storagehdtvstorage       AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:33 GMT-0500 (Central Daylight Time)
UPDATE_IN_PROGRESS       analyticshdtvanalytics   AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:33 GMT-0500 (Central Daylight Time)
UPDATE_IN_PROGRESS       authhdtvauth             AWS::CloudFormation::Stack Fri Oct 11 2019 15:39:33 GMT-0500 (Central Daylight Time)
ā “ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack


Following resources failed

āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete
An error occured during the push operation: Resource is not in the state stackUpdateComplete

I have been stuck here for couple of days and could not move on with my project due to this error. Any idea how to solve it?

I solved the issue by following @iqdev-ca and @dipjyotimetia , but after installing aws-amplify/cli I deleted amplify from my directory and reinitialized. These were the exact steps

I ran the command that @dipjyotimetia suggested:

npm i -g @aws-amplify/cli

I then deleted amplify by:

amplify delete

I then initialized amplify, added auth, and pushed:

amplify init
amplify add auth
amplify push

This finally solved the issue!!

image
My problem is that currently I have Comment and VideoComment models; both are in same Comment stack. Now, every time I modify the schema and do amplify push, amplify attempts to create VideoComment stack separately with DynamoDB table; while in fact, VideoComment table is already exists. That just messes everything up. I'm stuck with this for like 2 weeks now. It would be easy to do amplify something remove and amplify something add again but this happens on my Production Env. Any idea how to solve this?

Update: kinda don't want to create and modify stack template manually.

@patrickridd

I solved the issue by following @iqdev-ca and @dipjyotimetia , but after installing aws-amplify/cli I deleted amplify from my directory and reinitialized. These were the exact steps

I ran the command that @dipjyotimetia suggested:

npm i -g @aws-amplify/cli

I then deleted amplify by:

amplify delete

I then initialized amplify, added auth, and pushed:

amplify init
amplify add auth
amplify push

This finally solved the issue!!

I've tried this and it worked one time, but after a while it became not to work. I don't know what condition makes it not to work. But it's unreasonable to delete everytime when this error occurs. And this error continuously occurs.

@patrickridd

I solved the issue by following @iqdev-ca and @dipjyotimetia , but after installing aws-amplify/cli I deleted amplify from my directory and reinitialized. These were the exact steps
I ran the command that @dipjyotimetia suggested:
npm i -g @aws-amplify/cli
I then deleted amplify by:
amplify delete
I then initialized amplify, added auth, and pushed:
amplify init
amplify add auth
amplify push
This finally solved the issue!!

I've tried this and it worked one time, but after a while it became not to work. I don't know what condition makes it not to work. But it's unreasonable to delete everytime when this error occurs. And this error continuously occurs.

this happens to me too. I had to delete all my environment to solve this issue and I am again unable to do 'amplify push' and delete an auth

Template error: instance of Fn::GetAtt references undefined resource authyoaAuth
An error occured during the push operation: Template error: instance of Fn::GetAtt references undefined resource authyoaAuth

Got the same issue here... anyway we can update the error messages to make them more useful?

Is it not just a case of manually deleting the current GSI and creating the one that you want manually? Will give that a try. As I'm working on a live system. Will backup table of cheese :).

Follow these reset instructions:
https://medium.com/@ole.ersoy/resetting-aws-amplify-22fff655f2e2

like @dipjyotimetia suggested npm i -g @aws-amplify/cli worked. But after I also did:

amplify remove auth
Followed by

amplify add auth
Then amplify push didn't give any errors.

TThis doesnt work.

like @dipjyotimetia suggested npm i -g @aws-amplify/cli worked. But after I also did:
amplify remove auth
Followed by
amplify add auth
Then amplify push didn't give any errors.

TThis doesnt work.

same here, added auth and pushed

Same error with 4.13.2.

Amplify CLI version: 4.13.2
Node version: 13.6.0

Why was this issue closed @kaustavghosh06?

For reference, I was following this tutorial https://www.udemy.com/course/serverless-react-with-aws-amplify/ and I encountered the issue while creating an API via the CLI. Removing and adding auth didn't work for me, but deleting and reinitialising Amplify worked:

npm i -g @aws-amplify/cli

I then deleted amplify by:

amplify delete

I then initialized amplify, added auth, and pushed:

amplify init
amplify add auth
amplify push

This doesn't seem to be sustainable workaround as others have mentioned.

Perhaps my Node version is too new? As the awscloudformation/nested-cloudformation-stack.yml file lists "Runtime": "nodejs10.x". I will downgrade now to 10.19.0 and see if the error occurs again.

This was my error log:
```amplify push
āœ” Successfully pulled backend environment test from the cloud.

Current Environment: test

| Category | Resource name | Operation | Provider plugin |
| -------- | ------------------- | --------- | ----------------- |
| Auth | tutamplify7ad706f5 | Create | awscloudformation |
| Api | tutamplifynotetaker | Create | awscloudformation |
? Are you sure you want to continue? Yes

The following types do not have '@auth' enabled. Consider using @auth with @model
- Note
Learn more about @auth here: https://aws-amplify.github.io/docs/cli-toolchain/graphql#auth

GraphQL schema compiled successfully.

Edit your schema at /Users/sprazzeus/Code/tut-amplify/amplify/backend/api/tutamplifynotetaker/schema.graphql or place .graphql files in a directory at /Users/sprazzeus/Code/tut-amplify/amplify/backend/api/tutamplifynotetaker/schema
? Do you want to generate code for your newly created GraphQ
L API Yes
? Choose the code generation language target javascript
? Enter the file name pattern of graphql queries, mutations
and subscriptions src/graphql/*/.js
? Do you want to generate/update all possible GraphQL operat
ions - queries, mutations and subscriptions Yes
? Enter maximum statement depth [increase from default if yo
ur schema is deeply nested] 2
ā ¼ Updating resources in the cloud. This may take a few minutes...

CREATE_IN_PROGRESS authtutamplify7ad706f5 AWS::CloudFormation::Stack Mon Feb 10 2020 15:09:43 GMT+0000 (Greenwich Mean Time) Resource creation Initiated
CREATE_IN_PROGRESS UpdateRolesWithIDPFunctionRole AWS::IAM::Role Mon Feb 10 2020 15:09:42 GMT+0000 (Greenwich Mean Time) Resource creation Initiated
CREATE_IN_PROGRESS apitutamplifynotetaker AWS::CloudFormation::Stack Mon Feb 10 2020 15:09:42 GMT+0000 (Greenwich Mean Time) Resource creation Initiated
CREATE_IN_PROGRESS UpdateRolesWithIDPFunctionRole AWS::IAM::Role Mon Feb 10 2020 15:09:42 GMT+0000 (Greenwich Mean Time)
CREATE_IN_PROGRESS authtutamplify7ad706f5 AWS::CloudFormation::Stack Mon Feb 10 2020 15:09:42 GMT+0000 (Greenwich Mean Time)
CREATE_IN_PROGRESS apitutamplifynotetaker AWS::CloudFormation::Stack Mon Feb 10 2020 15:09:41 GMT+0000 (Greenwich Mean Time)
UPDATE_IN_PROGRESS amplify-tut-amplify-test-163734 AWS::CloudFormation::Stack Mon Feb 10 2020 15:09:38 GMT+0000 (Greenwiā “ Updating resources in the cloud. This may take a few minut
es...

CREATE_IN_PROGRESS amplify-tut-amplify-test-163734-authtutamplify7ad706f5-1QJH9CZRJ6Y31 AWS::CloudFormation::Stack Mon Feb 10 2020 15:09:42 GMT+0000 (Greenwich Mean Time) User Initā § Updating resources in the cloud. This may take a few minut
es...

CREATE_IN_PROGRESS amplify-tut-amplify-test-163734-apitutamplifynotetaker-IQSLS5UU60LF AWS::CloudFormation::Stack Mon Feb 10 2020 15:09:42 GMT+0000 (Greenwich Mean Time) User Initiā ¼ Updating resources in the cloud. This may take a few minut
es...

CREATE_FAILED amplify-tut-amplify-test-163734-authtutamplify7ad706f5-1QJH9CZRJ6Y31 AWS::CloudFormation::Stack Mon Feb 10 2020 15:09:48 GMT+0000 (Greenwich Mean Time) The following resource(s) failed to create: [SNSRole].
CREATE_FAILED SNSRole AWS::IAM::Role Mon Feb 10 2020 15:09:47 GMT+0000 (Greenwich Mean Time) snstest-test already exists in stack arn:aws:cloudformation:eu-west-2:936313097227:stack/amplify-retrospec-react-test-181616-authretrospecreacteb5279ef-110III6F0ON77/2b0a1150-49c0-11ea-83d7-06452e71541c
CREATE_IN_PROGRESS SNSRole AWS::IAM::Role Mon Feb 10 2020 15:09:47 GMT+0000 (Greenwich Mean Time) ā ¦ Updating resources in the cloud. This may take a few minut
es...

CREATE_IN_PROGRESS GraphQLAPI AWS::AppSync::GraphQLApi Mon Fā  Updating resources in the cloud. This may take a few minut
es...

CREATE_COMPLETE GraphQLAPI AWS::AppSync::GraphQLApi Mon Feb 10 2020 15:09:49 GMT+0000 (Greenwich Mean Time)
CREATE_IN_PROGRESS GraphQLAPI AWS::AppSync::GraphQLApi Mon Feb 10 2020 15:09:49 GMT+0000 (Greenwich Mean Time) Resource ā § Updating resources in the cloud. This may take a few minut
es...

CREATE_IN_PROGRESS GraphQLSchema AWS::AppSync::GraphQLSchemaā “ Updating resources in the cloud. This may take a few minut
es...

CREATE_FAILED apitutamplifynotetaker AWS::CloudFormation::Stack Mon Feb 10 2020 15:09:53 GMT+0000 (Greenwich Mean Time) Resource creation cancelled
CREATE_FAILED authtutamplify7ad706f5 AWS::CloudFormation::Stack Mon Feb 10 2020 15:09:53 GMT+0000 (Greenwich Mean Time) Embedded stack arn:aws:cloudformation:eu-west-2:936313097227:stack/amplify-tut-amplify-test-163734-authtutamplify7ad706f5-1QJH9CZRJ6Y31/5d931320-4c17-11ea-8e35-0aea06869730 was not successfully created: The following resource(s) failed to cā ¦ Updating resources in the cloud. This may take a few minut
es...

CREATE_IN_PROGRESS GraphQLSchema AWS::AppSync::GraphQLSchema Mon Feb 10 2020 15:09:53 GMT+0000 (Greenwich Mean Time) Resā ¦ Updating resources in the cloud. This may take a few minut
es...

UPDATE_ROLLBACK_IN_PROGRESS amplify-tut-amplify-test-163734 AWS::CloudFormation::Stack Mon Feb 10 2020 15:09:54 GMT+0000 (Greenwich Mean Time) The following resource(s) failed to create: [apitutamplifynotetaker, UpdateRolesWithIDPFunctionRole, authtutamplify7ad706f5].
CREATE_FAILED UpdateRolesWithIDPFunctionRole AWS::IAM::Role Mon Feb 10 2020 15:09:53 GMT+0000 (Greenwich Mean Time) Resource creation cancelled ā “ Updating resources in the cloud. This may take a few minut
es...

DELETE_COMPLETE UpdateRolesWithIDPFunctionRole AWS::IAM::Role Mon Feb 10 2020 15:10:13 GMT+0000 (Greenwich Mean Time)
DELETE_IN_PROGRESS UpdateRolesWithIDPFunctionRole AWS::IAM::Role Mon Feb 10 2020 15:10:10 GMT+0000 (Greenwich Mean Time)
DELETE_IN_PROGRESS authtutamplify7ad706f5 AWS::CloudFormation::Stack Mon Feb 10 2020 15:10:10 GMT+0000 (Greenwich Mean Time)
DELETE_IN_PROGRESS apitutamplifynotetaker AWS::CloudFormation::Stack Mon Feb 10 2020 15:10:10 GMT+0000 (Greenwich Mean Time)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS amplify-tut-amplify-test-163734 AWS::CloudFormation::Stack Mon Feb 10 2020 ā § Updating resources in the cloud. This may take a few minut
es...

DELETE_COMPLETE amplify-tut-amplify-test-163734-authtutamplify7ad706f5-1QJH9CZRJ6Y31 AWS::CloudFormation::Stack Mon Feb 10 2020 15:10:13 GMT+0000 (Greenwich Mean Time)
DELETE_COMPLETE SNSRole AWS::IAM::Role Mon Feb 10 2020 15:10:13 GMT+0000 (Greenwich Mean Time)
DELETE_IN_PROGRESS amplify-tut-amplify-test-163734-authtutamplify7ad706f5-1QJH9CZRJ6Y31 AWS::CloudFormation::Stack Mon Feb 10 2020 15:10:11 GMT+0000 (Greenwich Mean Time) User Initiated

CREATE_FAILED GraphQLSchema AWS::AppSync::GraphQLSchema Mon Feb 10 2020 15:10:11 GMT+0000 (Greenwich Mean Time) Resource creation cancelled
DELETE_IN_PROGRESS amplify-tut-amplify-test-163734-apitutamplifynotetaker-IQSLS5UU60LF AWS::CloudFormation::Stack Mon Feb 10 2020 15:10:11 GMT+0000 (Greenwich Mean Time) User Initā ‡ Updating resources in the cloud. This may take a few minut
es...

DELETE_COMPLETE authtutamplify7ad706f5 AWS::CloudFormation::Stack Mon Feb 10 2020 15:10:21 GMT+0000 (Greenwich Mean Timeā  Updating resources in the cloud. This may take a few minut
es...

DELETE_COMPLETE GraphQLAPI AWS::AppSync::GraphQLApi Mon Feb 10 2020 15:10:43 GMT+0000 (Greenwich Mean Time)
DELETE_IN_PROGRESS GraphQLAPI AWS::AppSync::GraphQLApi Mon Feb 10 2020 15:10:42 GMT+0000 (Greenwich Mean Time)
DELETE_COMPLETE GraphQLSchema AWS::AppSync::GraphQLSchema Mon Feb 10 2020 15:10:41 GMT+0000 (Greenwich Mean Time)
DELETE_IN_PROGRESS GraphQLSchema AWS::AppSync::GraphQLSchemaā ‡ Updating resources in the cloud. This may take a few minut
es...

UPDATE_ROLLBACK_COMPLETE amplify-tut-amplify-test-163734 AWS::CloudFormation::Stack Mon Feb 10 2020 15:10:45 GMT+0000 (Greenwich Mean Time)
DELETE_COMPLETE apitutamplifynotetaker AWS::CloudFormation::Stack Mon Feb 10 2020 15:10:45 GMT+0000 (Gā “ Updating resources in the cloud. This may take a few minut
ā ¦ Updating resources in the cloud. This may take a few minut
es...

Following resources failed

Resource Name: SNSRole (AWS::IAM::Role)
Event Type: create
Reason: snstest-test already exists in stack arn:aws:cloudformation:eu-west-2:936313097227:stack/amplify-retrospec-react-test-181616-authretrospecreacteb5279ef-110III6F0ON77/2b0a1150-49c0-11ea-83d7-06452e71541c

Resource Name: amplify-tut-amplify-163734-authRole-idp (AWS::IAM::Role)
Event Type: create
Reason: Resource creation cancelled

Resource Name: 2osumzmyvfhyrluexsbwh4ybduGraphQLSchema (AWS::AppSync::GraphQLSchema)
Event Type: create
Reason: Resource creation cancelled

āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete
An error occured during the push operation: Resource is not in the state stackUpdateComplete```

ANSWER: Amplify is a server that is installed locally like a git repository and then sends a path outwards to find the server similarly to how git sends out a path to a remote repository. Go under amplify/local-env-info.json and review the path after you relocate your repository. Update the path.

My issue was related to amplify storage, I said yes to the Lambda option but did not have a function for it, so I ran amplify update storage and change the option to not have Lambda, no really useful error was showed, I manage to push after.

Is there a best practice that's been settled on yet for this error?

šŸ˜…

Same issue here. I notice that the ticket is closed. I propose to open it again

same issue here, version is 4.20.0

same here...

Same issue please help. I am on 4.20.0
I get this issue for graphql. I haven't made any changes since its last successful push. The changes I've made were all done on a Lambda function.

UPDATE_FAILED GraphQLSchema AWS::AppSync::GraphQLSchema Fri Jun 05 2020 16:31:30 GMT-0700 (Pacific Daylight Time) The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: 212470B18528EE37; S3 Extended Request ID: fHURHxJI70ytB98bG9SVfiK8DLcCLc98xBYeTD76H6q7j1Zu8vXAUGUKpUagZul3i4znuZwHnBM=)
UPDATE_ROLLBACK_IN_PROGRESS amplify-valuetransfer-dev-204058-apivaluetransfer-1XC01EJ0Y8NX6 AWS::CloudFormation::Stack Fri Jun 05 2020 16:31:31 GMT-0700 (Pacific Daylight Time) The following resource(s) failed to update: [GraphQLSchema].
ā “ Updating resources in the cloud. This may take a few minutes...

UPDATE_FAILED apivaluetransfer AWS::CloudFormation::Stack Fri Jun 05 2020 16:31:41 GMT-0700 (Pacific Daylight Time) Embedded stack arn:aws:cloudformation:us-west-2:373682363314:stack/amplify-valuetransfer-dev-204058-apivaluetransfer-1XC01EJ0Y8NX6/63587200-a6df-11ea-893a-0a7bf50fa3c2 was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to update: [GraphQLSchema].
ā ¹ Updating resources in the cloud. This may take a few minutes...

....

āœ– An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete
An error occured during the push operation: Resource is not in the state stackUpdateComplete

Thanks in advance!

I fixed this by adding a space to my graphql schema file and re-pushing.
Still, this is a lingering bug but I hope the above steps will help someone.

I ran amplify function update and updated access to other resources in one function and it passed.
You can still run amplify function update again to go back to previous state.

FYI the only way I could get rid of this message was to delete aws-amplify from my project then delete the global npm package @aws-amplify/cli. I then reinstalled @aws-amplify/cli, ran amplify configure, then amplify init in my project. Once I added auth I was able to push it again.

It solved the problem in my case, thank you

FYI the only way I could get rid of this message was to delete aws-amplify from my project then delete the global npm package @aws-amplify/cli. I then reinstalled @aws-amplify/cli, ran amplify configure, then amplify init in my project. Once I added auth I was able to push it again.

If you are new to amplify, beware that - though it enables you to push/publish and might be the only option left - it will kill your stack / backend. Be sure to do this as a last resort or on a a stack that is pretty fresh.

Update - another occurence

Culprit was API GraphQL this time.

My recipe :

  • backup the tables (I name them all 20200718) so they are batched
  • make sure your schema is safe
  • amplify api remove
  • amplify api add
  • use your existing schema
  • delete newly created tables (but copy their name)
  • restore tables using the names of tables created by Amplify

@charleslouis How can I make a backup and restore it in more detail?

@gHashTag I Kinda think your message was adressed to me so here you go
Does it help ?
image

EDIT : I think I face a limitation with this Backup / remove / add api / restore tables approach.

I'll confirm but so far what happens is :

  • Backup / remove / add api / restore tables works - I can enjoy a working stack
  • BUT upon the next push - once Tables have been restored - Resource is not in the state stackUpdateComplete is back

I guess it could be :
1- because the arn of the table backups are not the same as the arn from newly created tables.
2- OR maybe it is not the full stack but the tables that are referenced as Resource is not in the state stackUpdateComplete

Any take on this odd theory ?

@charleslouis Thanks. Since my project is new, I just recreated the project. If I meet this problem again, I will definitely check it.

This happened to me today AGAIN for the n time, the trick that often works for me is to navigate back to the last successful push and then redeploy that version, that's easy when you are using the continuous deployment of the amplify, if you are not then you might need to git checkout to that particular commit then push that again, that will update the cloud formation stack to STACK_UPDATE_COMPLETE which is the state you want your cloud formation to be in, then you can just redeploy the latest one that you have.

Before I experienced this error, I had a typo error on my schema.graphql which resulted in the build failing (I'm unsure how that got the cloud formation stuck) so I fixed the typo and :tada: this wild error appeared, so I just navigated back to the last successful deployment, redeployed that, took a coffee break (got a girlfriend, got married, had a baby, when the baby was in college, I) came back to redeploy the fix for the typo.

It's worth noting that in some cases, like this case for me, the error is actually not what was said, the very bottom of the logs said _Resource is not in the state stackUpdateComplete_ message but when I scrolled up the actual error is CREATE_FAILED, a function that I created failed to be created on the cloud formation side, so it would be useful to scan through the logs and see what actually happened.

This happened to me as well. the reason in my case was failing to commit changed couldformation template.
A while ago, I ran git update-index --assume-unchanged <file> for lambda template files to avoid merge conflicts.
Today I added a lambda layer and updated one existing lambda function to use it, so its template needed to be commited but wasn't.

The fix was running git update-index --no-assume-unchanged <file> and commiting the branch. It triggered Amplify console to build and deploy correctly.

Is there any form of solution for this problem? Removing and adding API (although even this doesn't seem to work every time) is not a convenient thing to do whenever this error comes up.
Sometimes it can even show up when pushing completely fresh default GraphQL schema to the server! We have to live in a constant fear of the whole application breaking after a simple backend update.

Hi,
I solved the problem changing the awscloudformation template file for the layer function. For example, I removed the version names from templates files and kept the last version available in console. You can get this template values as like the bellow.

File name:{layerFunctionaName}-awscloudformation-template.json

"LambdaLayerPermissionprivate2": {
      "Type": "AWS::Lambda::LayerVersionPermission",
      "Properties": {
        "Action": "lambda:GetLayerVersion",
        "LayerVersionArn": {
          "Ref": "LambdaLayer"
        },
        "Principal": {
          "Ref": "AWS::AccountId"
        }
      }
    }

And then change the parameters.json to latest version.

{
  "layerVersion": 2
}

Version 1 I removed from console, so it started creating this problem, then I changed to version 2 with template changes. It worked as I expected!!

I decided to update the amplify/CLI to the latest version and did some changes to my schema then push it again, unfortunately I got the error "Resource is not in the state stackUpdateComplete",

Simply I re pushed again and it WORKED, everything back to normal, Just take that in consideration before removing/adding any functionality.

It's look like a merging problem.
_Save your local schema._
Run:

amplify pull

_The originial schema will be deleted !_

Update the schema from the copy you have created.
Then run:

Amplify push

Multiply API configuration can be an issue after doing such of operation.
You need to delete the old graph settings on the following file (Android):
app/src/main/res/raw/amplifyconfiguration.json

Was this page helpful?
0 / 5 - 0 ratings