question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't create new amplify environment due to Resource is not in the state stackUpdateComplete

See original GitHub issue

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

14.17.4

Amplify CLI Version

9.2.1

What operating system are you using?

Ubuntu on WSL

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes made

Amplify Categories

auth

Amplify Commands

push

Describe the bug

When I try to create a new amplify env and use amplify push it fails with this issue


CREATE_FAILED LambdaFunction                                                                     AWS::Lambda::Function      Mon Aug 08 2022 19:44:09 GMT+0530 (India Standard Time) Resource handler returned message: "null (Service: Lambda, Status Code: 403, Request ID: 212ac411-e056-4847-aa11-e633d0a6cb93)" (RequestToken: 42d45056-1a0e-092f-1fbe-5466a2b528e3, HandlerErrorCode: GeneralServiceException)
CREATE_FAILED amplify-chedarv2-local-184833-functionchedarAuthTestPostConfirmation-1STZPUEBOG9SS AWS::CloudFormation::Stack Mon Aug 08 2022 19:44:10 GMT+0530 (India Standard Time) The following resource(s) failed to create: [LambdaFunction].                                                                                                                                                                  
⠹ Updating resources in the cloud. This may take a few minutes...

CREATE_FAILED               functionchedarAuthTestPostConfirmation AWS::CloudFormation::Stack Mon Aug 08 2022 19:44:15 GMT+0530 (India Standard Time) Embedded stack arn:aws:cloudformation:eu-west-2:251651594881:stack/amplify-chedarv2-local-184833-functionchedarAuthTestPostConfirmation-1STZPUEBOG9SS/4e3e9860-1724-11ed-b1d6-068cbecabbd4 was not successfully created: The following resource(s) failed to create: [LambdaFunction]. 
CREATE_FAILED               UpdateRolesWithIDPFunctionRole         AWS::IAM::Role             Mon Aug 08 2022 19:44:16 GMT+0530 (India Standard Time) Resource creation cancelled                                                                                                                                                                                                                                                            
UPDATE_ROLLBACK_IN_PROGRESS amplify-chedarv2-local-184833          AWS::CloudFormation::Stack Mon Aug 08 2022 19:44:16 GMT+0530 (India Standard Time) The following resource(s) failed to create: [functionchedarAuthTestPostConfirmation, UpdateRolesWithIDPFunctionRole].                                                                                                                                                                  
⠴ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS UnauthRole       AWS::IAM::Role  Mon Aug 08 2022 19:44:20 GMT+0530 (India Standard Time) 
UPDATE_IN_PROGRESS DeploymentBucket AWS::S3::Bucket Mon Aug 08 2022 19:44:20 GMT+0530 (India Standard Time) 
UPDATE_IN_PROGRESS AuthRole         AWS::IAM::Role  Mon Aug 08 2022 19:44:20 GMT+0530 (India Standard Time) 
⠴ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE AuthRole AWS::IAM::Role Mon Aug 08 2022 19:44:39 GMT+0530 (India Standard Time) 
⠴ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE                              UnauthRole                             AWS::IAM::Role             Mon Aug 08 2022 19:44:39 GMT+0530 (India Standard Time) 
UPDATE_COMPLETE                              DeploymentBucket                       AWS::S3::Bucket            Mon Aug 08 2022 19:44:40 GMT+0530 (India Standard Time) 
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS amplify-chedarv2-local-184833          AWS::CloudFormation::Stack Mon Aug 08 2022 19:44:40 GMT+0530 (India Standard Time) 
DELETE_IN_PROGRESS                           UpdateRolesWithIDPFunctionRole         AWS::IAM::Role             Mon Aug 08 2022 19:44:41 GMT+0530 (India Standard Time) 
DELETE_IN_PROGRESS                           functionchedarAuthTestPostConfirmation AWS::CloudFormation::Stack Mon Aug 08 2022 19:44:41 GMT+0530 (India Standard Time) 
⠼ Updating resources in the cloud. This may take a few minutes...

DELETE_IN_PROGRESS amplify-chedarv2-local-184833-functionchedarAuthTestPostConfirmation-1STZPUEBOG9SS AWS::CloudFormation::Stack Mon Aug 08 2022 19:44:42 GMT+0530 (India Standard Time) User Initiated
DELETE_COMPLETE    LambdaFunction                                                                     AWS::Lambda::Function      Mon Aug 08 2022 19:44:44 GMT+0530 (India Standard Time)               
⠇ Updating resources in the cloud. This may take a few minutes...

DELETE_COMPLETE UpdateRolesWithIDPFunctionRole AWS::IAM::Role Mon Aug 08 2022 19:44:44 GMT+0530 (India Standard Time) 
⠧ Updating resources in the cloud. This may take a few minutes...

DELETE_IN_PROGRESS LambdaExecutionRole AWS::IAM::Role Mon Aug 08 2022 19:44:44 GMT+0530 (India Standard Time) 
⠴ Updating resources in the cloud. This may take a few minutes...

DELETE_COMPLETE LambdaExecutionRole                                                                AWS::IAM::Role             Mon Aug 08 2022 19:44:46 GMT+0530 (India Standard Time) 
DELETE_COMPLETE amplify-chedarv2-local-184833-functionchedarAuthTestPostConfirmation-1STZPUEBOG9SS AWS::CloudFormation::Stack Mon Aug 08 2022 19:44:47 GMT+0530 (India Standard Time) 
⠋ Updating resources in the cloud. This may take a few minutes...

DELETE_COMPLETE          functionchedarAuthTestPostConfirmation AWS::CloudFormation::Stack Mon Aug 08 2022 19:44:52 GMT+0530 (India Standard Time) 
UPDATE_ROLLBACK_COMPLETE amplify-chedarv2-local-184833          AWS::CloudFormation::Stack Mon Aug 08 2022 19:44:52 GMT+0530 (India Standard Time) 
⠙ Updating resources in the cloud. This may take a few minutes...

Following resources failed

Resource Name: LambdaFunction (AWS::Lambda::Function)
Event Type: create
Reason: Resource handler returned message: "null (Service: Lambda, Status Code: 403, Request ID: 212ac411-e056-4847-aa11-e633d0a6cb93)" (RequestToken: 42d45056-1a0e-092f-1fbe-5466a2b528e3, HandlerErrorCode: GeneralServiceException)


Resource Name: amplify-chedarv2-184833-authRole-idp (AWS::IAM::Role)
Event Type: create
Reason: Resource creation cancelled


✖ An error occurred when pushing the resources to the cloud
🛑 An error occurred during the push operation: /
Resource is not in the state stackUpdateComplete
⚠️ Review the Amplify CLI troubleshooting guide for potential next steps: https://docs.amplify.aws/cli/project/troubleshooting/

I haven’t been able to find any stack that isn’t in complete state.

Background:

We tried to update the amplify auth. It asked us to migrate the auth. We did that which somehow caused the cognito user pool to be deleted. We deleted this amplify env and tried to create a new amplify env from srcatch and since then have been facing this issue.

Expected behavior

The new env should be created.

Reproduction steps

  1. Create an amplify project
  2. Create auth and a postConfirmation lambda
  3. amplify update auth
  4. amplify migrate auth
  5. amplify move delete the current env
  6. amplify create a new env
  7. amplify push

GraphQL schema(s)

# Put schemas below this line


Project Identifier

Project Identifier: 5437340c7315fb2226dac1e3e0ea2585

Log output

# Put your logs below this line


Additional information

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
HectorMucommented, Oct 18, 2022

HELP 😭

0reactions
rahulnainwal107commented, Dec 26, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS Amplify: Resource is not in the state stackUpdateComplete
This worked for me: $ amplify update auth. Choose the option “Yes, use default configuration” (uses the Cognito Identitypool). Then:.
Read more >
Troubleshoot CloudFormation stack issues in AWS Amplify
... Amplify application, I receive an AWS CloudFormation error similar to the following: "Resource is not in the state stackUpdateComplete".
Read more >
Our app is stuck on UPDATE_ROLLBACK_FAILED state and ...
Hi, I updated AWS Amplify and now our app is in that state and can't be uploaded. It is failing in something related...
Read more >
Project-level configurations - Troubleshooting guide
On a successful deployment of the resources to AWS, the Amplify CLI renames the ... that are not correctly created or copied in...
Read more >
AWS Amplify: Resource is not in the state stackUpdateComplete
$ amplify configure codegen $ amplify codegen statements $ amplify push. I also wanted to update my S3 storage to add different permissions:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found