Skip to content

Conversation

@sai-ray
Copy link

@sai-ray sai-ray commented Nov 7, 2025

Description of changes

This PR implements stateful resource validation for the decommission command in Gen2 migration. In the decommission command's validation section (decommission.ts), we scan CloudFormation changesets to detect stateful resources (DynamoDB tables, S3 buckets, Cognito user pools, etc.) scheduled for deletion and prevent accidental data loss by blocking the operation.

This PR also optimizes stateful resource validation (_validations.ts) by implementing rate-limited concurrent API calls using Bottleneck to prevent CloudFormation throttling during nested stack scanning. UX improvements include spinner feedback with category-specific progress messages and enhanced error handling with retry logic.

Issue #, if available

Description of how you validated changes

  • Updated unit tests (_validations.test.ts) for stateful resource validation.
  • Manual verification against real Amplify Gen1 projects with nested stacks.
  • All tests pass successfully with yarn test.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sai-ray sai-ray changed the title chore: implement decommission with optimized stateful resource valida… feat(gen2-migration): implement decommission command with optimized stateful resource validation Nov 7, 2025
@sai-ray sai-ray marked this pull request as ready for review November 7, 2025 18:40
@sai-ray sai-ray requested a review from a team as a code owner November 7, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant