sst: sst deploy fails after Cognito user pool schema changes are wrongly detected
I’ve hit a blocker issue with sst deploy and sst diff detecting that my Cognito user pool’s schema field has changed and it then attempts to deploy it and fails with the error “cannot modify or remove schema items: provider=aws@6.56.1”.
This error would be expected given that Cognito doesn’t allow this, however, these fields have not changed in my code or in my AWS account and had been working fine through several deploys until I ran sst refresh when attempting to resolve a separate issue (Neon provider plugin crashed). From then onwards, I get this error when I run deploy.
I’m using SST v3.2.36.
Here’s my user pool definition:
export const mainUserPool = new sst.aws.CognitoUserPool("MainPool", {
aliases: ["email"],
transform: {
userPool: {
schemas: [
{
name: "user_id",
attributeDataType: "String",
developerOnlyAttribute: false,
mutable: true,
required: false,
},
],
},
},
});
When I run sst diff, I get:
* MainPool sst:aws:CognitoUserPool → MainPoolUserPool aws:cognito:UserPool
* schemas[0].attributeDataType = String
+ schemas[0].developerOnlyAttribute = false
* schemas[0].mutable = true
* schemas[0].name = user_id
+ schemas[0].required = false
* schemas[0].stringAttributeConstraints
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 15 (10 by maintainers)
Would be nice if the
sst diffcommand had a--verboseargument to show for*items that have changed, what was the value it’s being changed from so I could see why it thinks this field has changed