sst icon indicating copy to clipboard operation
sst copied to clipboard

AWS Cognito custom attributes incorrectly tracked

Open brynjarorng opened this issue 1 month ago • 1 comments

Hi,

It appears that custom attributes for cognito are incorrectly tracked by SST. If you try to remove a custom attribute which is not possible, SST fails as expected. It does however look like SST stops tracking the attribute internally as if it successfully removed it if you try to deploy again.

Steps to reproduce

  1. Add a custom attribute to the cognito user pool
  2. Remove the attribute from code and apply sst deploy --stage dev. The following error is printed a. UserPool sst:aws:CognitoUserPool → UserPoolUserPool aws:cognito:UserPool sdk-v2/provider2.go:515: sdk.helper_schema: updating Cognito User Pool (<POOL-ID>): cannot modify or remove schema items: [email protected]
  3. Apply again and the run is successful sst deploy --stage dev

SST version: 3.17.23 NodeJS version: 24.11.1

brynjarorng avatar Nov 26 '25 15:11 brynjarorng

I would recommend not using custom attributes https://github.com/sst/sst/issues/3928

arjunyel avatar Nov 27 '25 00:11 arjunyel