aws-amplify / aws-amplify/amplify-cli

[gen2-migration] Adopted Cognito User Pool: generated auth schema drifts from the pool's live schema attributes

Open
#14,975 0 comments 0 reactions 0 assignees View on GitHub
gen2-migration
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

## Summary
The auth schema synthesized for an adopted User Pool is derived from the Gen1 CloudFormation templates, not from the pool's live configuration (e.g. DescribeUserPool). Attributes added to the pool via the console/SDK after the Gen1 template was written are missing, so the generated schema drifts from the live pool. Because schema attributes on an existing pool are update-restricted, the deploy fails (and in the worst case would force pool replacement).

## Error
`Invalid request provided: Existing schema attributes cannot be modified or deleted.`

## Expected
Introspect the adopted pool's live schema attributes at migration time and pin the generated `amplify/auth` schema to match, so the deploy is a no-op on schema.

## Note
Distinct from #14932 (that is a TypeScript-emission quoting crash for custom attributes; this is live-vs-template schema drift). Cross-referencing for context.

## Type
Bug / blocker

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Gen2 migration handling for an adopted Cognito User Pool and the schema generation path derived from Gen1 templates. Compare that output with the pool's live attributes from DescribeUserPool; done means the generated amplify/auth schema matches the live pool and deployment does not attempt restricted schema changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
authentication, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.