aws-amplify / aws-amplify/amplify-cli
[gen2-migration] Adopted Cognito User Pool: generator includes immutable UsernameConfiguration in the update changeset
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
## Summary
When adopting a pre-existing Cognito User Pool, the generated auth stack includes `UsernameConfiguration`, which is create-only in CloudFormation, so the update deploy fails.
## Error
`[CFNUpdateNotSupportedError] ... Invalid request provided: Updates are not allowed for property - UsernameConfiguration.`
## Details
The codegen emits `UsernameConfiguration` as a raw passthrough for adopted pools; there is no automatic `addPropertyDeletionOverride('UsernameConfiguration')` for the adopted-pool case. (In some MFA/SMS configurations the adopt-time path also emits duplicate `UsernameConfiguration` deletion overrides — same root cause: the generator does not reconcile immutable properties for an adopted pool.)
## Expected
For an adopted pool, immutable properties such as `UsernameConfiguration` should be omitted from the update changeset automatically.
## Type
Bug / blocker
Contributor guide
Research direction
Start at the gen2-migration auth code generator and trace the adopted-pool path that emits UsernameConfiguration. Check how immutable-property deletion overrides are handled, especially for MFA/SMS configurations. Done means adopted-pool update changesets omit UsernameConfiguration and do not contain duplicate deletion overrides.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- authentication, cli, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100