amplify-cli: amplify push fails

Describe the bug We follow the tutorial exactly and it results in an error.

To Reproduce Steps to reproduce the behavior:

  1. npm i -g @aws-amplify/cli
  2. amplify configure
  3. amplify init
  4. amplify add auth
  5. amplify push

Expected behavior Amplify will be configured without na error.

Screenshots If applicable, add screenshots to help explain your problem.

$ amplify push
| Category | Resource name   | Operation | Provider plugin   |
| -------- | --------------- | --------- | ----------------- |
| Auth     | cognito73548268 | Create    | awscloudformation |
? Are you sure you want to continue? Yes
⠴ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS          webv3-20181213091931 AWS::CloudFormation::Stack Thu Dec 13 2018 10:07:33 GMT-0800 (PST) User Initiated                                                                                                                                                                  
CREATE_IN_PROGRESS          authcognito73548268  AWS::CloudFormation::Stack Thu Dec 13 2018 10:07:38 GMT-0800 (PST)                                                                                                                                                                                 
CREATE_FAILED               authcognito73548268  AWS::CloudFormation::Stack Thu Dec 13 2018 10:07:39 GMT-0800 (PST) Template format error: Unrecognized resource types: [AWS::Cognito::UserPool, AWS::Cognito::IdentityPoolRoleAttachment, AWS::Cognito::UserPoolClient, AWS::Cognito::IdentityPool]
UPDATE_ROLLBACK_IN_PROGRESS webv3-20181213091931 AWS::CloudFormation::Stack Thu Dec 13 2018 10:07:40 GMT-0800 (PST) The following resource(s) failed to create: [authcognito73548268].                                                                                                              
⠏ 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_CLEANUP_IN_PROGRESS webv3-20181213091931 AWS::CloudFormation::Stack Thu Dec 13 2018 10:07:55 GMT-0800 (PST) 
DELETE_COMPLETE                              authcognito73548268  AWS::CloudFormation::Stack Thu Dec 13 2018 10:07:57 GMT-0800 (PST) 
UPDATE_ROLLBACK_COMPLETE                     webv3-20181213091931 AWS::CloudFormation::Stack Thu Dec 13 2018 10:07:57 GMT-0800 (PST) 

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 6
  • Comments: 29 (12 by maintainers)

Most upvoted comments

Region can be the cause of the issue too. Check here for more information.

We solved our issue for this. Apparently, our account was limited because a while back one of our devs exposed one of our API keys on Github. We worked with AWS billing support to resolve the limited status on our account.

Same here 😦

Got all the latest everything as of 26/02/2019 but still getting this:

> amplify update auth
Please note that certain attributes may not be overwritten if you choose to use defaults settings.
Using service: Cognito, provided by: awscloudformation
 The current configured provider is Amazon Cognito.
 Do you want to use the default authentication and security configuration? No, I will set up my own configuration.
? Select the authentication/authorization services that you want to use: User Sign-Up, Sign-In, connected with AWS IAM controls (Enables per-user Storage features for images or other content, Analytics, and more)
? Allow unauthenticated logins? (Provides scoped down permissions that you can control via AWS IAM) Yes
? Do you want to enable 3rd party authentication providers in your identity pool? Yes
? Select the 3rd party authentication providers that you want to enable:  Google

 You've opted to allow users to authenticate via Google.  If you haven't already, you'll need to go to https://developers.google.com/identity and create an App ID.
 Enter your Google Web Client ID:  xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
? Multifactor authentication (MFA) user login options: OFF
? Email based user registration/forgot password: Disabled (Uses SMS/TOTP as an alternative)
? Please specify an SMS verification message: Your verification code is {####}
? Do you want to override the default password policy for this User Pool? No
? Specify the app's refresh token expiration period (in days): 30
? Do you want to specify the user attributes this app can read and write? No
Successfully updated resource cognito3a05b273 locally

Some next steps:
"amplify push" will build all your local backend resources and provision it in the cloud
"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud


> amplify push

Current Environment: dev

| Category | Resource name   | Operation | Provider plugin   |
| -------- | --------------- | --------- | ----------------- |
| Auth     | cognito3a05b273 | Update    | awscloudformation |
? Are you sure you want to continue? Yes
- Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS          androidcognito-20190225135902 AWS::CloudFormation::Stack Tue Feb 26 2019 08:51:09 GMT+1300 (New Zealand Daylight Time) User Initiated
UPDATE_IN_PROGRESS          authcognito3a05b273           AWS::CloudFormation::Stack Tue Feb 26 2019 08:51:15 GMT+1300 (New Zealand Daylight Time)
UPDATE_FAILED               authcognito3a05b273           AWS::CloudFormation::Stack Tue Feb 26 2019 08:51:15 GMT+1300 (New Zealand Daylight Time) Template format error: YAML not well-formed. (line 358, column 62)
UPDATE_ROLLBACK_IN_PROGRESS androidcognito-20190225135902 AWS::CloudFormation::Stack Tue Feb 26 2019 08:51:16 GMT+1300 (New Zealand Daylight Time) The following resource(s) failed to update: [authcognito3a05b273].
- Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE                              authcognito3a05b273           AWS::CloudFormation::Stack Tue Feb 26 2019 08:51:38 GMT+1300 (New Zealand Daylight Time)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS androidcognito-20190225135902 AWS::CloudFormation::Stack Tue Feb 26 2019 08:51:39 GMT+1300 (New Zealand Daylight Time)
UPDATE_IN_PROGRESS                           authcognito3a05b273           AWS::CloudFormation::Stack Tue Feb 26 2019 08:51:40 GMT+1300 (New Zealand Daylight Time)
UPDATE_COMPLETE                              authcognito3a05b273           AWS::CloudFormation::Stack Tue Feb 26 2019 08:51:41 GMT+1300 (New Zealand Daylight Time)
UPDATE_ROLLBACK_COMPLETE                     androidcognito-20190225135902 AWS::CloudFormation::Stack Tue Feb 26 2019 08:51:41 GMT+1300 (New Zealand 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

PS: this is why I use terraform or pulumi whenever I can - cloudformation is just so unstable and unreliable

@krishnaanaril @npradeeptha Thanks for the feedbacks, your problems seem to be different than what @kylepolich has reported here. Could you guys please log your own separated issues so we can better assist you to get them resolved?

@kylepolich From the stack logs, it looks like the failed operation is not add auth and push, the failure happened at amplify init. And the reason is that the IAM user that’s used to run the amplify init does not have the necessary permission. You can follow these steps to get it to work:

  • Execute amplify configure and follow the steps to setup a new IAM user, choose the default ‘AdministratorAccess’ permission will ensure no such problem will occur again, we are working to have more granular permission settings. Save the newly created user in a named profile (such as ‘default’)
  • Execute amplify init and choose the newly created profile when prompted.

Any update? We’d like to use Amplify but if the basic installation doesn’t work I don’t think its a mature enough tool for us. Is this in GA?