* Which Category is your question related to? *
I am trying to add storage to my app with the Amplify CLI. I am following the instructions at https://aws-amplify.github.io/docs/js/storage.
* What AWS Services are you utilizing? *
I am using Amplify CLI v0.1.29.
* Provide additional details e.g. code snippets *
Douglass-MacBook-Pro:hobbit-tracker docooper$ amplify push
| Category | Resource name | Operation | Provider plugin |
| -------- | --------------- | --------- | ----------------- |
| Storage | hobbitDB | Create | awscloudformation |
| Auth | cognito509c6c77 | No Change | awscloudformation |
? Are you sure you want to continue? true
⠏ 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_
What am I doing wrong?
@dougcpr Could you provide the full Cloudformation stack trace?
@kaustavghosh06 thank you for the quick reply.
I looked up the failed stacks and deleted stacks for storageHobbitDB wasn't in the complete or active stack.
I had this log where the create failed for storage DB in my console.
UPDATE_ROLLBACK_IN_PROGRESS hobbit-20181028210916 AWS::CloudFormation::Stack Mon Oct 29 2018 21:34:12 GMT-0500 (Central Daylight Time) The following resource(s) failed to create: [storagehobbitDB]. The following resource(s) failed to update: [authcognito509c6c77].
CREATE_FAILED storagehobbitDB AWS::CloudFormation::Stack Mon Oct 29 2018 21:34:11 GMT-0500 (Central Daylight Time) Parameters: [partitionKeyType, partitionKeyName, tableName] must have values
UPDATE_FAILED authcognito509c6c77 AWS::CloudFormation::Stack Mon Oct 29 2018 21:34:11 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_IN_PROGRESS authcognito509c6c77 AWS::CloudFormation::Stack Mon Oct 29 2018 21:34:10 GMT-0500 (Central Daylight Time)
CREATE_IN_PROGRESS storagehobbitDB AWS::CloudFormation::Stack Mon Oct 29 2018 21:34:10 GMT-0500 (Central Daylight Time)
UPDATE_IN_PROGRESS hobbit-20181028210916 AWS::CloudFormation::Stack Mon Oct 29 2018 21:34:05 GMT-0500 (Central Daylight Time) User Initiated
⠏ 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
UPDATE_ROLLBACK_COMPLETE hobbit-20181028210916 AWS::CloudFormation::Stack Mon Oct 29 2018 21:34:34 GMT-0500 (Central Daylight Time)
UPDATE_COMPLETE authcognito509c6c77 AWS::CloudFormation::Stack Mon Oct 29 2018 21:34:34 GMT-0500 (Central Daylight Time)
DELETE_COMPLETE storagehobbitDB AWS::CloudFormation::Stack Mon Oct 29 2018 21:34:34 GMT-0500 (Central Daylight Time)
UPDATE_IN_PROGRESS authcognito509c6c77 AWS::CloudFormation::Stack Mon Oct 29 2018 21:34:34 GMT-0500 (Central Daylight Time)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS hobbit-20181028210916 AWS::CloudFormation::Stack Mon Oct 29 2018 21:34:32 GMT-0500 (Central Daylight Time)
UPDATE_COMPLETE authcognito509c6c77 AWS::CloudFormation::Stack Mon Oct 29 2018 21:34:32 GMT-0500 (Central Daylight Time)
@dougcpr Which node version are you using? You can check by using 'node -v'
@kaustavghosh06
I am using node v11.0.0 and npm v6.4.1
Interesting. I've seen this issue pop up for Node v 10+ and I'm investigating the reason for this. Could you use 8.x and see if the issue still persists? Would really help us narrow down the issue
After you change the node version, you might want to run amplify configure project
command and then run amplify push
.
I ran those steps and when I amplify push, it was trying to look for a folder that doesn't exist in my amplify directory.
Since you haven't published the storage category to the cloud, can you do an amplify storage remove
and then add the storage category again using amplify storage add
and then amplify push
in the meanwhile to unblock yourself?
I'll try reproducing this issue.
I attempted to remove storage and got the following error.
An error occurred when removing the resources from the local directory
TERMINAL
Douglass-MacBook-Pro:hobbit-tracker docooper$ amplify storage remove
? Choose the resource you would want to remove hobbitDB
? Are you sure you want to delete the resource? This action deletes all files related to this resource from the backend directory. true
Error: ENOENT: no such file or directory, stat '/Users/docooper/webdev/hobbit-tracker/amplify/#current-cloud-backend/storage/hobbitDB'
An error occurred when removing the resources from the local directory
Can you do an amplify status
and check if the storage category is still present?
I get the same error as above when trying to do an amplify command.
Douglass-MBP:hobbit-tracker docooper$ amplify status
/Users/docooper/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/gluegun/build/index.js:13
throw up;
^
Error: ENOENT: no such file or directory, stat '/Users/docooper/webdev/hobbit-tracker/amplify/#current-cloud-backend/storage/hobbitDB'
Okay. To unblock, please remove the storage JSON block from amplify/backend/amplify-meta.json file (please note, that it is amplify/backend/ and not amplify/#current-cloud-backend), and then run amplify push
.
Thanks for your help! I was able to remove it and add a storage. The log showed it was successfully added too. I assume this will be the link in working with stacks?
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacks.html
I'm having the same issue and the instructions above did not fix my issues.
`UPDATE_IN_PROGRESS syadev-20181104165911 AWS::CloudFormation::Stack Sun Nov 04 2018 19:32:02 GMT-0800 (PST) User Initiated
UPDATE_IN_PROGRESS authcognitof491a051 AWS::CloudFormation::Stack Sun Nov 04 2018 19:32:06 GMT-0800 (PST)
CREATE_IN_PROGRESS storagesyabucket AWS::CloudFormation::Stack Sun Nov 04 2018 19:32:06 GMT-0800 (PST)
UPDATE_FAILED authcognitof491a051 AWS::CloudFormation::Stack Sun Nov 04 2018 19:32:06 GMT-0800 (PST) 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
CREATE_FAILED storagesyabucket AWS::CloudFormation::Stack Sun Nov 04 2018 19:32:07 GMT-0800 (PST) Parameters: [bucketName, unauthPolicyName, authRoleName, unauthRoleName, unauthPermissions, authPolicyName, authPermissions] must have values
UPDATE_ROLLBACK_IN_PROGRESS syadev-20181104165911 AWS::CloudFormation::Stack Sun Nov 04 2018 19:32:07 GMT-0800 (PST) The following resource(s) failedto create: [storagesyabucket]. The following resource(s) failed to update: [authcognitof491a051].
⠇ Updating resources in the cloud. This may take a few minutes...
UPDATE_COMPLETE authcognitof491a051 AWS::CloudFormation::Stack Sun Nov 04 2018 19:32:15 GMT-0800 (PST)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS syadev-20181104165911 AWS::CloudFormation::Stack Sun Nov 04 2018 19:32:15 GMT-0800 (PST)
UPDATE_IN_PROGRESS authcognitof491a051 AWS::CloudFormation::Stack Sun Nov 04 2018 19:32:17 GMT-0800 (PST)
UPDATE_COMPLETE authcognitof491a051 AWS::CloudFormation::Stack Sun Nov 04 2018 19:32:17 GMT-0800 (PST)
DELETE_COMPLETE storagesyabucket AWS::CloudFormation::Stack Sun Nov 04 2018 19:32:17 GMT-0800 (PST)
UPDATE_ROLLBACK_COMPLETE syadev-20181104165911 AWS::CloudFormation::Stack Sun Nov 04 2018 19:32:17 GMT-0800 (PST)
⠹ 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`
@KSamra Which version of node are you using?
I'm using Node version 8.12.0. I was able to use Amplify to build a Cognito user pool but running
amplify add storage
amplify push
fails every time with the above CloudFormation stack trace. Unlike @dougcpr though, I am able to easily delete the storage by doing
amplify storage remove
The only thing that fails as far as I can tell is the push command.
@KSamra Were you able to get the app running?
Same issue came to me. I am using @aws-amplify/cli@multienv version of cli. I had earlier created graphQl api and cognito user pool successfully via cli. Added couple of users to the pool and some data in dynamo via appsync.
But now i when update stack and add s3 storage, and do amplify push, this fails with the following comment:-
✖ An error occurred when pushing the resources to the cloud
Resource is not in the state stackUpdateComplete
Is this the problem with stability of cli version? I am using node v11.6.0
@artista7 What’s the error stack trace which you see on your terminal? There might be a non-unique S3 bucket name which caused cloud formation the push to fail.
I think the issue is amplify automatically adds some upper case characters to resource while creation.
CREATE_FAILED learning-sage-20190122020457-storages3-1SJEMC4UM7ZDM AWS::CloudFormation::Stack Tue Jan 29 2019 12:05:51 GMT+0530 (India Standard Time) The following resource(s) failed to create: [S3Bucket].
CREATE_FAILED S3Bucket AWS::S3::Bucket Tue Jan 29 2019 12:05:51 GMT+0530 (India Standard Time) Bucket name should not contain uppercase characters
I had used resource name as s3, and provide bucket name as learning-sage-s3 while configuring s3 bucket using amplify storage add.
Can someone have a look?
I see. We can look into this. In the meanwhile you can manually modify the bucketname in your ‘amplify/backend/storage/
Also, regarding custom resolver through amplify, how soon can we expect that functionality? #574
@artista7 We're in testing phase for #574 and would be releasing it soon in the coming weeks
Here's the PR for the same https://github.com/aws-amplify/amplify-cli/pull/581, if you want to build it and test it out.
Btw, did the solution which I mentioned above regarding the bucketname work for you?
Umm, the solution did not work. In ‘amplify/backend/storage//parameters.json' i had bucket name - "bucketName": "lsbucket", but the error - Bucket name should not contain uppercase characters still shows.
@artista7 That's interesting. Could you tell me what your env name is? you can find it out if you do an amplify status
my env name is - shubBox. Is this name the cause of problem? also can all the resources be configured to have env name as suffix instead of timestamp?
let me try creating an environment with all lowercase characters and try this
@artista7 The resourcename you're seeing is the cloudformation stakc resource name. The actual resource name would be lsbucket-showBox
. So we do append the env name to the resource name.
FInally! Things are working.
I think amplify-cli should not allow env names with caps at first place, right?
Thanks
@artista7 That is correct..although this issue is valid only for S3 buckets which has very strict naming conventions. We'll look into it and have a come up with a solution for it.
@kaustavghosh06 Seems like on amplify delete, s3 buckets for storage and deployments keep hanging around, while every other resource gets removed from cloud.... This might again lead to clutter of hanging buckets.
@artista7 There's a service side limitation from S3 which doesn't allow you to delete S3 buckets vi Cloudformation if there's any content in it that's why it doesn't automatically get removed when we delete/remove the Cloudformation stack. Having said that we could probably go outside the Cloudformation environment and make direct SDK calls to delete these buckets. Let me talk to the team and see what they think about it.
I am receiving the same error when trying to amplify add storage
and then amplify push
amplify push
| Category | Resource name | Operation | Provider plugin |
| -------- | ------------- | --------- | ----------------- |
| Storage | userstorage | Create | awscloudformation |
| Auth | AuthResource | Update | awscloudformation |
| Api | api | Update | awscloudformation |
? Are you sure you want to continue? true
GraphQL schema compiled successfully. Edit your schema at /Users/robmoore/floom/client/amplify/backend/api/api/schema.graphql
⠙ Updating resources in the cloud. This may take a few minutes...
UPDATE_IN_PROGRESS client-20190117124816 AWS::CloudFormation::Stack Sat Feb 02 2019 22:24:36 GMT-0500 (EST) User Initiated
CREATE_IN_PROGRESS storageuserstorage AWS::CloudFormation::Stack Sat Feb 02 2019 22:24:40 GMT-0500 (EST)
UPDATE_IN_PROGRESS authAuthResource AWS::CloudFormation::Stack Sat Feb 02 2019 22:24:40 GMT-0500 (EST)
CREATE_IN_PROGRESS storageuserstorage AWS::CloudFormation::Stack Sat Feb 02 2019 22:24:41 GMT-0500 (EST) Resource creation Initiated
⠼ Updating resources in the cloud. This may take a few minutes...
CREATE_IN_PROGRESS client-20190117124816-storageuserstorage-1REFL96LCLMZR AWS::CloudFormation::Stack Sat Feb 02 2019 22:24:40 GMT-0500 (EST) User Initiated
UPDATE_IN_PROGRESS client-20190117124816-authAuthResource-1A0DT8CD9UAY4 AWS::CloudFormation::Stack Sat Feb 02 2019 22:24:41 GMT-0500 (EST) User Initiated
CREATE_IN_PROGRESS S3Bucket AWS::S3::Bucket Sat Feb 02 2019 22:24:44 GMT-0500 (EST)
CREATE_FAILED S3Bucket AWS::S3::Bucket Sat Feb 02 2019 22:24:45 GMT-0500 (EST) user already exists
CREATE_FAILED client-20190117124816-storageuserstorage-1REFL96LCLMZR AWS::CloudFormation::Stack Sat Feb 02 2019 22:24:46 GMT-0500 (EST) The following resource(s) failed to create: [S3Bucket].
⠼ Updating resources in the cloud. This may take a few minutes...
UPDATE_IN_PROGRESS IdentityPool AWS::Cognito::IdentityPool Sat Feb 02 2019 22:24:47 GMT-0500 (EST)
UPDATE_COMPLETE IdentityPool AWS::Cognito::IdentityPool Sat Feb 02 2019 22:24:49 GMT-0500 (EST)
CREATE_FAILED storageuserstorage AWS::CloudFormation::Stack Sat Feb 02 2019 22:24:51 GMT-0500 (EST) Embedded stack arn:aws:cloudformation:us-east-1:327232318798:stack/client-20190117124816-storageuserstorage-1REFL96LCLMZR/3e1686a0-2763-11e9-abcb-126514929126 was not successfully created: The following resource(s) failed to create: [S3Bucket].
UPDATE_ROLLBACK_IN_PROGRESS client-20190117124816-authAuthResource-1A0DT8CD9UAY4 AWS::CloudFormation::Stack Sat Feb 02 2019 22:24:52 GMT-0500 (EST) Initiated by parent stack
⠴ Updating resources in the cloud. This may take a few minutes...
UPDATE_FAILED authAuthResource AWS::CloudFormation::Stack Sat Feb 02 2019 22:25:03 GMT-0500 (EST) Resource update cancelled
UPDATE_ROLLBACK_IN_PROGRESS client-20190117124816 AWS::CloudFormation::Stack Sat Feb 02 2019 22:25:04 GMT-0500 (EST) The following resource(s) failed to create: [storageuserstorage]. The following resource(s) failed to update: [authAuthResource].
⠴ Updating resources in the cloud. This may take a few minutes...
UPDATE_IN_PROGRESS authAuthResource AWS::CloudFormation::Stack Sat Feb 02 2019 22:25:19 GMT-0500 (EST)
⠇ Updating resources in the cloud. This may take a few minutes...
UPDATE_IN_PROGRESS IdentityPool AWS::Cognito::IdentityPool Sat Feb 02 2019 22:25:49 GMT-0500 (EST)
UPDATE_COMPLETE IdentityPool AWS::Cognito::IdentityPool Sat Feb 02 2019 22:25:51 GMT-0500 (EST)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS client-20190117124816-authAuthResource-1A0DT8CD9UAY4 AWS::CloudFormation::Stack Sat Feb 02 2019 22:25:53 GMT-0500 (EST)
UPDATE_COMPLETE authAuthResource AWS::CloudFormation::Stack Sat Feb 02 2019 22:25:54 GMT-0500 (EST)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS client-20190117124816 AWS::CloudFormation::Stack Sat Feb 02 2019 22:25:56 GMT-0500 (EST)
⠙ Updating resources in the cloud. This may take a few minutes...
UPDATE_IN_PROGRESS authAuthResource AWS::CloudFormation::Stack Sat Feb 02 2019 22:25:57 GMT-0500 (EST)
DELETE_IN_PROGRESS storageuserstorage AWS::CloudFormation::Stack Sat Feb 02 2019 22:25:57 GMT-0500 (EST)
DELETE_IN_PROGRESS client-20190117124816-storageuserstorage-1REFL96LCLMZR AWS::CloudFormation::Stack Sat Feb 02 2019 22:25:58 GMT-0500 (EST) UserInitiated
UPDATE_ROLLBACK_COMPLETE client-20190117124816-authAuthResource-1A0DT8CD9UAY4 AWS::CloudFormation::Stack Sat Feb 02 2019 22:25:58 GMT-0500 (EST)
DELETE_SKIPPED S3Bucket AWS::S3::Bucket Sat Feb 02 2019 22:26:00 GMT-0500 (EST)
DELETE_COMPLETE client-20190117124816-storageuserstorage-1REFL96LCLMZR AWS::CloudFormation::Stack Sat Feb 02 2019 22:26:00 GMT-0500 (EST)
⠋ Updating resources in the cloud. This may take a few minutes...
UPDATE_COMPLETE authAuthResource AWS::CloudFormation::Stack Sat Feb 02 2019 22:26:08 GMT-0500 (EST)
DELETE_COMPLETE storageuserstorage AWS::CloudFormation::Stack Sat Feb 02 2019 22:26:08 GMT-0500 (EST)
UPDATE_ROLLBACK_COMPLETE client-20190117124816 AWS::CloudFormation::Stack Sat Feb 02 2019 22:26:09 GMT-0500 (EST)
⠹ 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
This might be the same problem. @robert-moore what is your environment name? It should be lowercase....
@artista7 We now just allow the env names to be lowercase for the time being until we come up with a better solution. Please install the latest CLI using npm install -g @aws-amplify/cli
and let me know (and re-opne the issue) if you're still facing this issue.
I was having the same issue as the original, my problem was that the cloudformation file (amplify/backend/awscloudformation/nested-cloudformation-stack.yml
) was not getting updated with all of the parameters from amplify/backend/storage/mystorage/parameters.json
, and was resulting in a CREATE_FAILED due to missing params.
Running amplify configure project
worked for me, when I ran amplify push
post configure it populated the params correctly in the cloudformation yml.
Hi ,
@dougcpr just once try to remove this annotation (@connection(name:"anyname")) in schema.graphql file
Hi,
if anyone facing with this issues (Resource is not in the state stackUpdateComplete) ,
when amplify push used just verify commas
Error
type TestObj{
id:ID!
param1 : String ,
param2 : String ,
}
success:
type TestObj{
id:ID!
param1 : String
param2 : String
}
please remove the commas (,) , for me after removing the commas , all the resources updated to cloud
Most helpful comment
After you change the node version, you might want to run
amplify configure project
command and then runamplify push
.