amplify-cli: Push fails with "....must have values"
Describe the bug Version: 0.1.36
To Reproduce
amplify api update
- Add a new REST API
amplify api push
Expected behavior
- Push succeeds
Screenshots Log:
Hughs-Air-2:Common hugh$ amplify push
| Category | Resource name | Operation | Provider plugin |
| -------- | ------------- | --------- | ----------------- |
| Api | Write | Update | awscloudformation |
| Auth | UploadService | No Change | awscloudformation |
| Api | Read | No Change | awscloudformation |
? Are you sure you want to continue? Yes
⠧ Updating resources in the cloud. This may take a few minutes...
UPDATE_IN_PROGRESS ploadervice-20181127191856 AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:25 GMT+0000 (GMT) User Initiated
UPDATE_IN_PROGRESS authUploadService AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:29 GMT+0000 (GMT)
UPDATE_IN_PROGRESS apiWrite AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:29 GMT+0000 (GMT)
UPDATE_FAILED authUploadService AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:29 GMT+0000 (GMT) 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_IN_PROGRESS apiRead AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:29 GMT+0000 (GMT)
UPDATE_FAILED apiWrite AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:30 GMT+0000 (GMT) Resource update cancelled
⠼ Updating resources in the cloud. This may take a few minutes...
UPDATE_IN_PROGRESS ploadervice-20181127191856-apiWrite-FK15AWZWA5TA AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:30 GMT+0000 (GMT) User Initiated
UPDATE_IN_PROGRESS ploadervice-20181127191856-apiRead-7P740P5QX900 AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:30 GMT+0000 (GMT) User Initiated
UPDATE_ROLLBACK_IN_PROGRESS ploadervice-20181127191856-apiWrite-FK15AWZWA5TA AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:30 GMT+0000 (GMT) Initiated by parent stack
UPDATE_ROLLBACK_IN_PROGRESS ploadervice-20181127191856-apiRead-7P740P5QX900 AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:31 GMT+0000 (GMT) Initiated by parent stack
⠋ Updating resources in the cloud. This may take a few minutes...
UPDATE_FAILED apiRead AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:41 GMT+0000 (GMT) Resource update cancelled
UPDATE_ROLLBACK_IN_PROGRESS ploadervice-20181127191856 AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:42 GMT+0000 (GMT) The following resource(s) failed to update: [apiRead, authUploadService, apiWrite].
UPDATE_COMPLETE authUploadService AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:46 GMT+0000 (GMT)
UPDATE_IN_PROGRESS apiRead AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:46 GMT+0000 (GMT)
⠏ Updating resources in the cloud. This may take a few minutes...
UPDATE_IN_PROGRESS apiWrite AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:46 GMT+0000 (GMT)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS ploadervice-20181127191856-apiRead-7P740P5QX900 AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:49 GMT+0000 (GMT)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS ploadervice-20181127191856-apiWrite-FK15AWZWA5TA AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:50 GMT+0000 (GMT)
⠋ Updating resources in the cloud. This may take a few minutes...
UPDATE_COMPLETE apiRead AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:57 GMT+0000 (GMT)
UPDATE_COMPLETE apiWrite AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:57 GMT+0000 (GMT)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS ploadervice-20181127191856 AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:58 GMT+0000 (GMT)
UPDATE_IN_PROGRESS apiRead AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:59 GMT+0000 (GMT)
UPDATE_IN_PROGRESS apiWrite AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:59 GMT+0000 (GMT)
UPDATE_IN_PROGRESS authUploadService AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:59 GMT+0000 (GMT)
UPDATE_COMPLETE authUploadService AWS::CloudFormation::Stack Sat Dec 15 2018 12:29:59 GMT+0000 (GMT)
UPDATE_ROLLBACK_COMPLETE ploadervice-20181127191856-apiRead-7P740P5QX900 AWS::CloudFormation::Stack Sat Dec 15 2018 12:30:00 GMT+0000 (GMT)
UPDATE_ROLLBACK_COMPLETE ploadervice-20181127191856-apiWrite-FK15AWZWA5TA AWS::CloudFormation::Stack Sat Dec 15 2018 12:30:00 GMT+0000 (GMT)
⠹ Updating resources in the cloud. This may take a few minutes...
UPDATE_COMPLETE apiRead AWS::CloudFormation::Stack Sat Dec 15 2018 12:30:10 GMT+0000 (GMT)
UPDATE_COMPLETE apiWrite AWS::CloudFormation::Stack Sat Dec 15 2018 12:30:10 GMT+0000 (GMT)
UPDATE_ROLLBACK_COMPLETE ploadervice-20181127191856 AWS::CloudFormation::Stack Sat Dec 15 2018 12:30:10 GMT+0000 (GMT)
⠴ 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
It seems like parameters in ./amplify/backend/awscloudformation/nested-cloudformation-stack.yml
are being deleted:
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 15 (3 by maintainers)
Just ran into this issue after attempting to update an API after I had moved my project directory, I think it has something to do with
.config/local-env-info.json
running
amplify configure project
fixed the “must have values” / “Resource is not in the state stackUpdateComplete” error for me@btackney @hughbe Can you check your amplify/.config/project-config.json file and see if the project path is correct? I’ve faced this issue in the past and its due to some mismatch in the project path with the actual project path.
I finally resolved it!!! without removing the API or thing like that.
basically, whats happening is that your amplify is went out of sync, you have in your schema.graphql a custom function with the directive @function(name: “anyname-${env}”) and you have deleted the function, and now you trying to return a deleted function, which breaks sync of the amplify.
in order to fix that :
No need to remove the API! or such thing, do not do it, please.
Hey guys, we store the project configuration (including project path) in
amplify/.config/local-env-info.json
file (which the CLI uses to parse your project structure), and if you change your directory name, you could either runamplify configure project
or change the projectpath manually in the file mentioned above.I have not changed my folder name or manually changed any configuration settings. I ran
amplify configure project
just in case and I am still getting the must have values error. Anyone got any other possible solutions?Updating the local path solved my issue. Thank you @sankhagowit!
Im experiencing the same issue. I have tried to update individually but gives same error.