How did you install the Amplify CLI?
No response
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
NA
What operating system are you using?
NA
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Describe the bug
When migrating from Amplify Gen 1 to Gen 2, the following Cognito user attribute configurations were lost:
Initial State (Gen 1 — cli-inputs.json):
- Sign-in method: Username
- Required for signup: email
- Auto-verified: email
- MFA: OFF
- Password policy: min 12 chars, requires lowercase, numbers, symbols
- Identity pool: enabled, unauthenticated access disabled
- Refresh token validity: 30 days
- App client read attributes: birthdate, email
- App client write attributes: address, email
- No OAuth, no Lambda triggers, no user pool groups
Current State (Gen 2 — resource.ts + backend.ts):
- Sign-in method: Username (set via usernameAttributes = undefined override) ✅
- Required for signup: email ✅
- Auto-verified: email ✅
- MFA: OFF ✅
- Password policy: min 12 chars, requires lowercase, numbers, symbols (set via CFN override) ✅
- Identity pool: enabled, unauthenticated access disabled ✅
- Refresh token validity: 30 days (set via custom app client) ✅
- App client read attributes: not configured ❌
- App client write attributes: not configured ❌
- birthdate attribute: not declared in userAttributes ❌
- address attribute: not declared in userAttributes ❌
What's missing:
- birthdate and address are not declared in userAttributes in resource.ts, so they won't be available on the user pool.
- The custom NativeAppClient in backend.ts does not specify readAttributes or writeAttributes, so the read/write restrictions from Gen 1 are not carried over.
Expected behavior
The Gen 2 config should declare birthdate (read-only) and address (writable) in userAttributes, and the app client should restrict read attributes to birthdate and email, and write attributes to address and email — matching the original Gen 1 configuration.
Reproduction steps
nA
Project Identifier
No response
Log output
Details
# Put your logs below this line
Additional information
No response
Before submitting, please confirm:
How did you install the Amplify CLI?
No response
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
NA
What operating system are you using?
NA
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Describe the bug
When migrating from Amplify Gen 1 to Gen 2, the following Cognito user attribute configurations were lost:
Initial State (Gen 1 — cli-inputs.json):
Current State (Gen 2 — resource.ts + backend.ts):
What's missing:
Expected behavior
The Gen 2 config should declare birthdate (read-only) and address (writable) in userAttributes, and the app client should restrict read attributes to birthdate and email, and write attributes to address and email — matching the original Gen 1 configuration.
Reproduction steps
nA
Project Identifier
No response
Log output
Details
Additional information
No response
Before submitting, please confirm: