Skip to content

feat(gen2-migration): remove Gen 1 name preservation from codegen synthesizer#14317

Merged
dgandhi62 merged 2 commits intoaws-amplify:gen2-migrationfrom
dgandhi62:backend-synthesizer-auth
Nov 5, 2025
Merged

feat(gen2-migration): remove Gen 1 name preservation from codegen synthesizer#14317
dgandhi62 merged 2 commits intoaws-amplify:gen2-migrationfrom
dgandhi62:backend-synthesizer-auth

Conversation

@dgandhi62
Copy link
Copy Markdown
Contributor

In the old tool, names were being assigned to user pools, identity pools, and s3 buckets. This resulted in escape hatches being generated in the backend.ts file during migration. However, these names aren't needed to be set. User pools use ids as their primary identifier. Cloudformation auto-names s3 buckets if a custom name isn't provided.

Therefore, in this pr, I remove AMPLIFY_GEN_1_ENV_NAME logic and resource name assignments from the codegen backend synthesizer. This allows gen2 resources to naturally name themselves. The refactor step will handle resource mapping between Gen 1 and Gen 2 stacks.

The main impact of this pr is to improve user experience on running 'generate'.

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

Remove AMPLIFY_GEN_1_ENV_NAME logic and resource name assignments to allow
Gen 2 resources to use natural naming. Refactor step will handle resource
mapping between Gen 1 and Gen 2 stacks.

- Comment out createAmplifyEnvNameLogic() call
- Remove userPoolName template literal assignment
- Remove identityPoolName template literal assignment
- Remove S3 bucketName template literal assignment
- Keep configuration extraction for password policies and other settings
@dgandhi62 dgandhi62 requested a review from a team as a code owner November 2, 2025 17:31
@iliapolo iliapolo changed the title feat: remove Gen 1 name preservation from codegen synthesizer feat(gen2-migration): remove Gen 1 name preservation from codegen synthesizer Nov 3, 2025
@dgandhi62 dgandhi62 merged commit ca9dcd1 into aws-amplify:gen2-migration Nov 5, 2025
4 checks passed
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.

2 participants