In amplify, I have added Api and a Auth (AWS Cognito) resources as follows. The Api is configured to use Auth Cognito User Pool to authenticate.
┌──────────┬───────────────┬───────────┬───────────────────┐
│ Category │ Resource name │ Operation │ Provider plugin │
├──────────┼───────────────┼───────────┼───────────────────┤
│ Auth │ testd50c8ec7 │ No Change │ awscloudformation │
├──────────┼───────────────┼───────────┼───────────────────┤
│ Api │ testApi │ No Change │ awscloudformation │
└──────────┴───────────────┴───────────┴───────────────────┘
I'm still in development and I want to change Auth (Cognito) to login with phone number. So, I have to remove Auth and add a new Auth resource (changing an existing user pool with phone log in is not allowed). When I remove the Auth resource and do a amplify push. I get an error:
Template error: instance of Fn::GetAtt references undefined resource testd50c8ec7
What should I do to remove the old and add a new Auth resource?