amplify-cli: [amplify add api] - push: Resource is not in the state stackUpdateComplete
Describe the bug
Adding a schema via amplify add api cli-command always fails while applying amplify push
To Reproduce Steps to reproduce the behavior:
react-native initwas my initial creation call- updated node & npm to current release
- installed
amplify-cliand configured it to my aws account - installed dependencies and
react-native link - By several tryouts I decided to delete the previous created amplify folders and file within the react-native project & reinstalling the project dependencies concerning amplify
- Deleted all AWS Services (I am new to AWS, but I am kind of sure that I dont need 6 different roles under IAM for a brand new project via appsync)
6.1 Cloud formation stacks removed
6.2 DynamoDB was removed by previous canceled
amplify add api6.3 As 5.2 same for Appsync 6.4 Deleted all deletable IAM roles (AWSServiceRoleForSupport & AWSServiceRoleForTrustedAdvisor remained) amplify init7.1 VS-Code 7.2 javascript 7.3 react-native 7.4 src 7.5 distribution 7.6 build command: enter 7.7 start command: enter 7.8 use aws profile “yes”- checking amount of added roles
8.1
2 new cognito identity roles were addedwith no permission policies underIAM / Roles amplify add api9.1 graphql 9.2 paidoapi 9.3 api key 9.4 notated schema? “no” 9.5 schema creation? “yes” 9.6 “one-to-many relationship” 9.7 “yes” 9.8. continue “enter” 9.9. compiled successfully- amplify push 10.1 operation -> create 10.2 generate code “yes” 10.3 filename pattern -> src/api/**/*.js 10.4 flow 10.5 src/api/API.js 10.6 generate auto code “yes”
schema.graphql
type Task @model {
id: ID!
title: String!
description: String!
budget: Int!
status: TASKSTATUS
dueDate: String!
dateType: TASKDUEDATE
location: Location
offers: [Offer] @connection(name: "TaskOffers")
comments: [Comment] @connection(name: "TaskComments")
}
type Offer @model {
id: ID!
counterBudget: String!
accepted: Boolean!
task: Task @connection(name: "TaskOffers")
haggles: [Haggle] @connection(name: "OfferHaggles")
}
type Haggle @model {
id: ID!
content: String
offer: Offer @connection(name: "OfferHaggles")
}
type Comment @model {
id: ID!
content: String!
parentCommentID: ID
task: Task @connection(name: "TaskComments")
}
type Location @model {
lat: Float!
lon: Float!
}
enum TASKSTATUS {
open
assigned
done
canceled
}
enum TASKDUEDATE {
on
until
}
Expected behavior Less frustration. Generate auto code and setup cloud environment successfully from local generated schema.
Screenshots amplify-meta.json
{
"providers": {
"awscloudformation": {
"AuthRoleName": "a-20181001105327-authRole",
"UnauthRoleArn": "arn:aws:iam::135532242699:role/a-20181001105327-unauthRole",
"AuthRoleArn": "arn:aws:iam::135532242699:role/a-20181001105327-authRole",
"Region": "eu-central-1",
"DeploymentBucketName": "a-20181001105327-deployment",
"UnauthRoleName": "a-20181001105327-unauthRole",
"StackName": "a-20181001105327",
"StackId": "arn:aws:cloudformation:eu-central-1:135532242699:stack/a-20181001105327/76c1f750-c557-11e8-b36a-50a68ad4f2fe"
}
},
"api": {
"paidoapi": {
"service": "AppSync",
"providerPlugin": "awscloudformation",
"output": {
"securityType": "API_KEY"
},
"providerMetadata": {
"s3TemplateURL": "https://s3.amazonaws.com/a-20181001105327-deployment/amplify-cfn-templates/api/cloudformation-template.json",
"logicalId": "apipaidoapi"
},
"lastPushTimeStamp": "2018-10-01T09:08:08.488Z"
}
}
}
parameters.json
{
"AppSyncApiName": "paidoapi",
"schemaGraphql": "s3://a-20181001105327-deployment/amplify-appsync-files/schema.graphql.1538384751009",
"ResolverBucket": "a-20181001105327-deployment",
"ResolverRootKey": "amplify-appsync-files",
"DeploymentTimestamp": "1538384751009"
}
Console.log
UPDATE_IN_PROGRESS a-20181001105327 AWS::CloudFormation::Stack Mon Oct 01 2018 11:08:09 GMT+0200 (CEST) User Initiated
CREATE_IN_PROGRESS apipaidoapi AWS::CloudFormation::Stack Mon Oct 01 2018 11:08:13 GMT+0200 (CEST)
CREATE_IN_PROGRESS apipaidoapi AWS::CloudFormation::Stack Mon Oct 01 2018 11:08:14 GMT+0200 (CEST) Resource creation Initiated
⠦ Updating resources in the cloud. This may take a few minutes...
CREATE_IN_PROGRESS a-20181001105327-apipaidoapi-3DTXQ23VZ8W6 AWS::CloudFormation::Stack Mon Oct 01 2018 11:08:14 GMT+0200 (CEST) User Initiated
⠧ Updating resources in the cloud. This may take a few minutes...
CREATE_IN_PROGRESS OfferTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:28 GMT+0200 (CEST)
CREATE_IN_PROGRESS GraphQLAPI AWS::AppSync::GraphQLApi Mon Oct 01 2018 11:08:22 GMT+0200 (CEST)
CREATE_IN_PROGRESS GraphQLAPIKey AWS::AppSync::ApiKey Mon Oct 01 2018 11:08:28 GMT+0200 (CEST)
CREATE_IN_PROGRESS CommentTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:28 GMT+0200 (CEST) Resource creation Initiated
CREATE_IN_PROGRESS TaskTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:28 GMT+0200 (CEST) Resource creation Initiated
CREATE_IN_PROGRESS HaggleTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:28 GMT+0200 (CEST)
CREATE_IN_PROGRESS CommentTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:28 GMT+0200 (CEST)
CREATE_IN_PROGRESS GraphQLAPI AWS::AppSync::GraphQLApi Mon Oct 01 2018 11:08:24 GMT+0200 (CEST) Resource creation Initiated
CREATE_IN_PROGRESS LocationTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:28 GMT+0200 (CEST) Resource creation Initiated
CREATE_IN_PROGRESS TaskTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:28 GMT+0200 (CEST)
CREATE_IN_PROGRESS LocationTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:28 GMT+0200 (CEST)
CREATE_IN_PROGRESS GraphQLSchema AWS::AppSync::GraphQLSchema Mon Oct 01 2018 11:08:27 GMT+0200 (CEST)
CREATE_COMPLETE GraphQLAPI AWS::AppSync::GraphQLApi Mon Oct 01 2018 11:08:24 GMT+0200 (CEST)
CREATE_IN_PROGRESS HaggleTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:28 GMT+0200 (CEST) Resource creation Initiated
CREATE_IN_PROGRESS OfferTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:29 GMT+0200 (CEST) Resource creation Initiated
⠧ Updating resources in the cloud. This may take a few minutes...
CREATE_FAILED HaggleTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:33 GMT+0200 (CEST) Resource creation cancelled
CREATE_IN_PROGRESS GraphQLAPIKey AWS::AppSync::ApiKey Mon Oct 01 2018 11:08:30 GMT+0200 (CEST) Resource creation Initiated
CREATE_COMPLETE GraphQLAPIKey AWS::AppSync::ApiKey Mon Oct 01 2018 11:08:31 GMT+0200 (CEST)
CREATE_IN_PROGRESS GraphQLSchema AWS::AppSync::GraphQLSchema Mon Oct 01 2018 11:08:31 GMT+0200 (CEST) Resource creation Initiated
CREATE_FAILED GraphQLSchema AWS::AppSync::GraphQLSchema Mon Oct 01 2018 11:08:32 GMT+0200 (CEST) Schema Creation Status + FAILED
CREATE_FAILED TaskTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:33 GMT+0200 (CEST) Resource creation cancelled
CREATE_FAILED LocationTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:33 GMT+0200 (CEST) Resource creation cancelled
CREATE_FAILED OfferTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:33 GMT+0200 (CEST) Resource creation cancelled
CREATE_FAILED CommentTable AWS::DynamoDB::Table Mon Oct 01 2018 11:08:33 GMT+0200 (CEST) Resource creation cancelled
CREATE_FAILED a-20181001105327-apipaidoapi-3DTXQ23VZ8W6 AWS::CloudFormation::Stack Mon Oct 01 2018 11:08:34 GMT+0200 (CEST) The following resource(s) failed to create: [CommentTable, LocationTable, HaggleTable, GraphQLSchema, TaskTable, OfferTable].
CREATE_FAILED apipaidoapi AWS::CloudFormation::Stack Mon Oct 01 2018 11:08:36 GMT+0200 (CEST) Embedded stack arn:aws:cloudformation:eu-central-1:135532242699:stack/a-20181001105327-apipaidoapi-3DTXQ23VZ8W6/86f403a0-c559-11e8-ab8c-503f2ad2e536 was not successfully created: The following resource(s) failed to create: [CommentTable, LocationTable, HaggleTable, GraphQLSchema, TaskTable, OfferTable].
UPDATE_ROLLBACK_IN_PROGRESS a-20181001105327 AWS::CloudFormation::Stack Mon Oct 01 2018 11:08:37 GMT+0200 (CEST) The following resource(s) failed to create: [apipaidoapi].
⠇ Updating resources in the cloud. This may take a few minutes...
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS a-20181001105327 AWS::CloudFormation::Stack Mon Oct 01 2018 11:08:57 GMT+0200 (CEST)
DELETE_IN_PROGRESS apipaidoapi AWS::CloudFormation::Stack Mon Oct 01 2018 11:08:58 GMT+0200 (CEST)
DELETE_IN_PROGRESS a-20181001105327-apipaidoapi-3DTXQ23VZ8W6 AWS::CloudFormation::Stack Mon Oct 01 2018 11:08:58 GMT+0200 (CEST) User Initiated
⠋ Updating resources in the cloud. This may take a few minutes...
DELETE_IN_PROGRESS CommentTable AWS::DynamoDB::Table Mon Oct 01 2018 11:09:00 GMT+0200 (CEST)
DELETE_IN_PROGRESS GraphQLAPIKey AWS::AppSync::ApiKey Mon Oct 01 2018 11:09:00 GMT+0200 (CEST)
DELETE_IN_PROGRESS LocationTable AWS::DynamoDB::Table Mon Oct 01 2018 11:09:00 GMT+0200 (CEST)
DELETE_IN_PROGRESS HaggleTable AWS::DynamoDB::Table Mon Oct 01 2018 11:09:00 GMT+0200 (CEST)
DELETE_IN_PROGRESS TaskTable AWS::DynamoDB::Table Mon Oct 01 2018 11:09:01 GMT+0200 (CEST)
DELETE_IN_PROGRESS GraphQLSchema AWS::AppSync::GraphQLSchema Mon Oct 01 2018 11:09:01 GMT+0200 (CEST)
DELETE_IN_PROGRESS OfferTable AWS::DynamoDB::Table Mon Oct 01 2018 11:09:01 GMT+0200 (CEST)
DELETE_COMPLETE GraphQLAPIKey AWS::AppSync::ApiKey Mon Oct 01 2018 11:09:02 GMT+0200 (CEST)
DELETE_COMPLETE GraphQLSchema AWS::AppSync::GraphQLSchema Mon Oct 01 2018 11:09:04 GMT+0200 (CEST)
⠦ Updating resources in the cloud. This may take a few minutes...
DELETE_COMPLETE TaskTable AWS::DynamoDB::Table Mon Oct 01 2018 11:10:33 GMT+0200 (CEST)
⠇ Updating resources in the cloud. This may take a few minutes...
DELETE_COMPLETE CommentTable AWS::DynamoDB::Table Mon Oct 01 2018 11:13:03 GMT+0200 (CEST)
DELETE_COMPLETE HaggleTable AWS::DynamoDB::Table Mon Oct 01 2018 11:13:03 GMT+0200 (CEST)
DELETE_COMPLETE LocationTable AWS::DynamoDB::Table Mon Oct 01 2018 11:13:04 GMT+0200 (CEST)
DELETE_COMPLETE OfferTable AWS::DynamoDB::Table Mon Oct 01 2018 11:13:04 GMT+0200 (CEST)
DELETE_IN_PROGRESS GraphQLAPI AWS::AppSync::GraphQLApi Mon Oct 01 2018 11:13:05 GMT+0200 (CEST)
DELETE_COMPLETE GraphQLAPI AWS::AppSync::GraphQLApi Mon Oct 01 2018 11:13:07 GMT+0200 (CEST)
DELETE_COMPLETE a-20181001105327-apipaidoapi-3DTXQ23VZ8W6 AWS::CloudFormation::Stack Mon Oct 01 2018 11:13:08 GMT+0200 (CEST)
⠇ Updating resources in the cloud. This may take a few minutes...
DELETE_COMPLETE apipaidoapi AWS::CloudFormation::Stack Mon Oct 01 2018 11:13:37 GMT+0200 (CEST)
UPDATE_ROLLBACK_COMPLETE a-20181001105327 AWS::CloudFormation::Stack Mon Oct 01 2018 11:13:37 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
Cloud Formation

Desktop (please complete the following information):
- OS: [Mac OSX 10.14]
- react-native [0.57.1]
- npm [6.4.1]
- Node.js [8.12.0]
Additional context ONLY working case is if you were RENAMING - AND JUST RENAMING the types of the sample graphql file.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (8 by maintainers)
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
That was quick, i think the error is different for mine i can see in log that there has been policy missing
i think the line Template error: IAM role hssaseperation-20190121155849-unauthRole doesn’t exist says it all.