Describe the bug
Hi, I am using the AWS Amplify CLI on my web project using amplify vue. I was testing different plugins, and now I am trying to delete the storage plugin, but when I trying to push my changes after doing amplify remove storage it throws and error "Parameters: [CreateAPIKey] do not exist in the template", and "An error occurred during the push operation: Resource is not in the state stackUpdateComplete" so it doesn't let me push.
Thank you
@vdiaza Can you run amplify update api and then try pushing again?
@kaustavghosh06 it didn't work, I feel that it's related to graphql and I havent done any changes on that. it should be related to the s3 bucket storage.
| Category | Resource name | Operation | Provider plugin |
| -------- | ----------------- | --------- | ----------------- |
| Function | S3Trigger3788d79c | Delete | awscloudformation |
| Storage | s3aee1971a | Delete | awscloudformation |
| Auth | marqusbd54bdc2 | No Change | awscloudformation |
| Api | marqus | No Change | awscloudformation |
@vdiaza From the cloudformation stack trace it looks like its the API resource. Can you try deleting the amplify/backend/api/<resource-name>/build directory, and run amplify api gql-compile and then do a push again?
@kaustavghosh06 no luck... I should mention that i have to backend folders "backend & #current-cloud-backend" .
Also i found in backend/awscloudformation/nested-cloud-formationstack.yml
"apimarqus": {
"Type": "AWS::CloudFormation::Stack",
"Properties": {
"TemplateURL": "https://s3.amazonaws.com/marqus-dev-20191009195157-deployment/amplify-cfn-templates/api/cloudformation-template.json",
"Parameters": {
"CreateAPIKey": 0,
...
}
}
},
@vdiaza That's useful info. Can you check if your amplify/backend/api/<resource-name>/build/cloudformation-template.json file has the following block in it?
"CreateAPIKey": {
"Type": "Number",
"Description": "The boolean value to control if an API Key will be created or not. The value of the property is automatically set by the CLI. If the value is set to 0 no API Key will be created.",
"Default": 0,
"MinValue": 0,
"MaxValue": 1
},
@kaustavghosh06 it does, but still not able to push
That's strange. Can you make a change to the amplify/backend/api/<resource-name>/schema.graphql file - just add a space - so that it's an "Update" operation in the above-mentioned status operation and the template is uploaded from local.
@kaustavghosh06 that somehow solved the problem, thank you!
@kaustavghosh06 FYI : had the same issue. resolved by adding space to the schema file as well.
Amplify Version: 3.14.0
I have a similar issue, but the error is in domainName
I added a new endpoint to api using amplity update api, but when I try to push I receive this error message:
UPDATE_FAILED myAmplifyApi
AWS::CloudFormation::Stack Thu Oct 22 2020 12:28:44 GMT-0300 (GMT-03:00) Parameters: [domainName, domainCertificateArn, myenvDomainCertificateArn] do not exist in the template
And the last error message is:
Following resources failed
✖ An error occurred when pushing the resources to the cloud
Resource is not in the state stackUpdateComplete
An error occurred during the push operation: Resource is not in the state stackUpdateComplete
Someone may help me?
Most helpful comment
That's strange. Can you make a change to the
amplify/backend/api/<resource-name>/schema.graphqlfile - just add a space - so that it's an "Update" operation in the above-mentioned status operation and the template is uploaded from local.