feat(gen2-migration): add deployment status validation and unit tests for safe migrations#14313
Merged
iliapolo merged 1 commit intogen2-migrationfrom Nov 3, 2025
Conversation
iliapolo
approved these changes
Nov 3, 2025
b2214fc to
3e007c8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
This PR implements deployment status validation to ensure CloudFormation root stack for amplify app is in a stable state before proceeding with Gen 1 to Gen 2 migrations. The implementation adds a validateDeploymentStatus() method that queries the CloudFormation root stack status using AWS SDK v3 and validates that the stack exists and is in either CREATE_COMPLETE or UPDATE_COMPLETE state. When validation fails, it throws appropriate AmplifyError instances (StackNotFoundError or StackStateError) with clear messaging to guide users on resolution steps.
Issue #, if available
Description of how you validated changes
Added unit tests covering multiple scenarios:
Checklist
yarn testpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.