Repository navigation
Amplify Backend Gen1 → Gen2 Migration (Developer Preview) #14490
Replies: 13 comments 19 replies
|
Heads up folks we identified a code generation bug: #14492 It pretty elusive at the moment and doesn't happen on every app. If this happens to you, please let us know and share your setup. Thanks! |
|
Is there any reason why Flutter is not supported? Or is it untested yet |
|
I didn't see anything mentioned about DataStore alternatives? Imho, that's a big deal for the app functionality. I would also try to have something like a high level map of features of gen1 to gen2 from admin perspective, otherwise it's easy to get lost how things function or what's their purpose, or where things managed. I wrote about migration path a while back from that point of view |
|
Thanks for the update. I haven't tested yet, but off the top of my head we use lambda layers heavily (well we just have 1 layer but it's shared with multiple lambdas). So I think we can't test this migration until lambda layers is supported in gen 2? |
|
Update that we released a new version of the tool (now in developer preview as part of the Gen1 CLI) as well as the migration guide, which is now in the official amplify docs: https://docs.amplify.aws/react/start/migrate-to-gen2/ Give it a try and let us know! |
|
| Attempt | Prepare step | Last API call on the Gen 2 auth stack before CreateStackRefactor |
Create → Execute | Result |
|---|---|---|---|---|
1 (--yes) |
change sets executed on both auth stacks | ExecuteChangeSet 26 s earlier (stack UPDATE_COMPLETE 26 s before) |
13 s | refused |
2 (--yes) |
skipped ("didn't contain changes") | DeleteChangeSet 66 s earlier |
11 s | refused |
| 3 (attended, waited >5 min at the confirmation prompt) | skipped | plan-phase CreateChangeSet/DeleteChangeSet several minutes earlier |
~10 s | refused |
Refactor ids: 5e6808f4-134a-4fd8-9bd8-f1328b045ee6, 8538d884-fe20-40dc-ac8c-810657f9ea90, 1dfcaec1-3d6c-42ec-92e6-797ece0f1b30 (2026-09-09, 17:38 / 17:53 / 18:23 UTC).
Evidence that nothing updated the stack
- CloudTrail (
EventSource=cloudformation.amazonaws.com) shows no call touching the Gen 2 auth nested stack between eachCreateStackRefactorand itsExecuteStackRefactor. DescribeStackEventson that stack: last event is the tool's own prepare update (UPDATE_COMPLETE, attempt 1); nothing after.- No change sets left on either auth stack, no drift results, no stack policy on the nested stacks (the lock policy is on the Gen 1 root only), no termination protection.
- Other principals: none. The Gen 2 stack was deployed by a CI role; the refactor runs as an IAM user with AdministratorAccess.
Two smaller tool observations
- After the failure, the holding stack stays in
REVIEW_IN_PROGRESSwith an empty template. On re-run,AuthCognitoForwardRefactorer.beforeMove/movethrowUnexpected state of stack …-holding: REVIEW_IN_PROGRESS(the baseForwardCategoryRefactorer.beforeMovewould have scheduled its deletion), and the automatic rollback dies inCfn.fetchTemplate("returned an empty template"). The stale holding stack has to be deleted by hand before any re-run or--rollback. - The plan phase leaves zero-change
gen2-migration-<ts>change sets on the storage stacks on every run.
Questions
- Is
ExecuteStackRefactorexpected to refuse a nested stack that was updated directly by the tool's prepare step (so its template differs from what its parent last deployed)? - Is a settle time required between
CreateStackRefactorreachingCREATE_COMPLETEandExecuteStackRefactor, or between the destination stack being created and execution?
Happy to share the refactor.operations snapshots or run diagnostics. Nothing has moved, Gen 1 is still locked and serving production, so we can retry on request.
|
Follow-up, 2026-09-09 19:35 UTC — fourth reproduction, with the holding stack pre-created. To rule out destination-stack creation as the trigger, we created the Run interactively, several minutes after the plan phase; CloudTrail still shows no call touching the source stack since the tool's own prepare update. So the refusal is independent of timing, human confirmation, and destination creation, and is tied to that source nested stack. The remaining candidate is that the source is a nested stack whose template was updated directly by the prepare step (so it differs from the template its parent last deployed). An AWS Support case is open in parallel (CloudFormation / APIs). Small additional note: with a pre-created holding stack the automatic rollback fails with |
|
Root cause isolated (2026-09-09, us-west-2), reproducible without Amplify. Thirteen throwaway-stack variants (SNS topics only; parent → nested child; one topic refactored out to a new stack via
Every refusal is the same Observed rule: a nested stack whose An AWS Support case (CloudFormation / APIs) is open with the full reproduction; happy to share the case id with the Amplify team privately. Until CloudFormation answers, the only ways forward we see are (a) waiting for a fix/explanation, or (b) not refactoring: |
|
AWS Support confirmation (2026-09-10). Support Engineering reviewed the reproduction above and replied that they "see other cases reported with similar errors recently" and that "this appears to be a CloudFormation service-side issue"; it has been escalated to the internal CloudFormation team. No ETA yet. For the Amplify maintainers: the |
|
Update from AWS Support (2026-09-11): the internal CloudFormation team has "identified a service-side issue that is impacting your ability to execute stack refactors" and is "actively working on a fix, with an estimated resolution date of September 25, 2026." Interim workaround they offered (manual, "intricate", at your own risk — we are not taking it for production auth/storage): (1) For maintainers: until the fix ships, |
|
Per AWS Support's suggestion we have also opened an Amplify Framework / CLI support case, id 178914507800209 (2026-09-11), asking the Amplify team to (1) confirm awareness and plan an end-to-end re-test of |
|
Update 2026-09-21: resolved. AWS deployed the CloudFormation fix to us-west-2 ahead of the Sept 25 estimate (confirmed on Amplify case 178914507800209 on 2026-09-18).
Three things worth knowing before your Step 8 deploy:
Support cases 178897886700512 (CloudFormation) and 178914507800209 (Amplify) have the full details; the two tool defects reported earlier (stale |
|
At the Amplify support team's request the two tool defects from this thread (stale |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Amplify team has launched a beta version of a flavor of the Gen1 CLI that adds support for migrating Gen1 backend environments to Gen2.
Caution
The migration tool discussed here is in early stages of development and SHOULD NOT be
executed on any production or mission critical environments. Only run it for testing
purposes on environments you can afford to delete.
Your feedback will significantly help the team improve and stabilize the tool. We welcome and encourage any feedback on the migration process:
Get started by following our migration guide. We are eager to hear what you think and incorporate your feedback in the upcoming versions!
Thanks.
All reactions