Skip to content

gen2-migration | unrecoverable state due to refactor occasionally timing out #14485

@iliapolo

Description

@iliapolo

How did you install the Amplify CLI?

npm install --no-save @aws-amplify/cli-internal-gen2-migration-experimental-alpha

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

No response

Amplify CLI Version

0.4.0

What operating system are you using?

Mac

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

No

Describe the bug

When running npx amplify gen2-migration refactor I get:

[2026-01-17T18:54:05.662Z] [refactor] [productcatalog/main] • 
[2026-01-17T18:54:05.662Z] [refactor] [productcatalog/main] • 🔧 Executing CloudFormation stack refactor...
[2026-01-17T18:54:05.662Z] [refactor] [productcatalog/main] • 📋 Selected categories: auth, storage
[2026-01-17T18:54:05.800Z] [refactor] [productcatalog/main] • Updating Gen 1 auth stack...
[2026-01-17T18:54:27.753Z] [refactor] [productcatalog/main] • Updated Gen 1 auth stack successfully
[2026-01-17T18:54:27.929Z] [refactor] [productcatalog/main] • Updating Gen 2 auth stack...
[2026-01-17T18:54:56.064Z] [refactor] [productcatalog/main] • Updated Gen 2 auth stack successfully
[2026-01-17T18:54:56.065Z] [refactor] [productcatalog/main] • Moving auth resources from Gen 1 to Gen 2 stack...
[2026-01-17T18:55:21.544Z] [refactor] [productcatalog/main] • Moved auth resources from Gen 1 to Gen 2 stack successfully
[2026-01-17T18:55:21.812Z] [refactor] [productcatalog/main] • Updating Gen 1 storage stack...
[2026-01-17T18:55:52.285Z] [refactor] [productcatalog/main] • Updated Gen 1 storage stack successfully
[2026-01-17T18:55:52.542Z] [refactor] [productcatalog/main] • Updating Gen 2 storage stack...
🛑 Execution failed: Error: Stack arn:aws:cloudformation:us-east-1:185706627232:stack/amplify-dsw5hcwm9g43j-gen2main-branch-165e4bab25-storage0EC3F24A-1RT2EABNPYBII/06e07df0-f3d3-11f0-a18d-0affdc8bd0d5 did not reach a completion state within the given time period.

[2026-01-17T18:57:25.778Z] [refactor] [productcatalog/main] → Rolling back
[2026-01-17T18:57:25.778Z] [refactor] [productcatalog/main] • Not implemented
[2026-01-17T18:57:25.778Z] [refactor] [productcatalog/main] → Rollback complete
🛑 Stack arn:aws:cloudformation:us-east-1:185706627232:stack/amplify-dsw5hcwm9g43j-gen2main-branch-165e4bab25-storage0EC3F24A-1RT2EABNPYBII/06e07df0-f3d3-11f0-a18d-0affdc8bd0d5 did not reach a completion state within the given time period.

Since refactor is neither idempotent nor reversible - this kind of error is currently terminal and requires recreating the Gen1 environment and starting over.

Expected behavior

For the command to complete successfully, or print a more descriptive error if it cannot.

Reproduction steps

The behavior is sporadic, it happened to me while following the gen2-migration guide of product-catalog app.

Project Identifier

No response

Log output

Details
# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions