What's the suggested procedure when I can't remove...
# help
j
What's the suggested procedure when I can't remove the stack due to an error:
Error: jplacek-sst-my-stack/Auth/UserPool/UserPoolDomain/Resource [AWS::Cognito::UserPoolDomain] is missing required property: domain
f
Are you getting this error when removing a stack?
j
Sorry for not reacting sooner I didn't notice the response until now. Yes during
sst remove.
The stack somehow got corrupted, most likely because it throwed an error during deploy, that user pool domain is already in use. The resources (user pool + client) were created (I was able to locate them in cloudformation stack), but they did not get associated with one another - I couldn't see the client in user pool detail in AWS console Cognito pool page. So something went quite wrong. I managed to "fix" it by firstly removing domain configuration, then deploying, then I was finally able to
sst remove
without errors and then finally deploy from scratch without errors.
However I don't have a clue how I would be solving an issue like this on production server.
f
Oh it seems CloudFormation was stuck in a weird state. 🤔
I guess the escape hatch would be to retain the User Pool when removing the CF stack. And then manually remove the User Pool from the Cognito console.