amplify-hosting
amplify-hosting copied to clipboard
Cognito amplify_backend_manager_APPID deleted
Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the FAQ.
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
App Id
arn:aws:amplify:eu-west-1:770204761019:apps/d3azouarb564gt
Region
eu-west-1
Amplify Hosting feature
Access control
Describe the bug
I deleted the amplify_backend_manager_APPID userpool in Cognito by mistake. So I have :
- lost the access on the Studio.
- lost the possibility to push through the CLI which require a connection on the Studio.
- lost the possibility to manage the access to the Studio from aws.console/amplify.
Expected behavior
The main aws profile still being the same, the possibility to recreate the a new userpool manually or using automatic process through the CLI would be helpful and to link it to the current project.
Reproduction steps
- Create an aws account.
- Follow the AWS amplify tutorial.
- Delete the automatically created pool on Cognito.
- Try to access the Studio or to push
Build Settings
No response
Additional information
No response
Hi @tomacf 👋🏽 which AWS amplify tutorial did you follow?
Hello @hloriana ! Thanks for your time.
I followed that one or a previous version of it few months ago. https://docs.amplify.aws/start/getting-started/installation/q/integration/react/#option-2-follow-the-instructions
But I'm not sure that the tutorial may impact any reproduction of the error issue, the amplify project was working correctly until I deleted by mistake the cognito user pool generated by amplify to handle the connection to the Studio and the interaction. I'm really looking for a solution to recreate that user pool or to replace it.
Hi @tomacf,
Agreed, I do believe that the Console workflow of enabling/disabling Studio can be improved. Nevertheless, here's a workaround that you could use to move past this error -
-
Create a new sample Amplify application from Amplify Console using option "Build an app".
-
Check and verify new Amplify application created successfully and check Amplify App ID from "General" under App settings.
-
Navigate to Cognito Userpool console and you will find a newly created Cognito userpool - amplify_backend_manager_[sample_amplify_App_ID] (Amplify App ID noted in step 2). Note down the below information for this Cognito userpool - i. Cognito Userpool ID ii. Cognito Userpool webclient ID iii. Cognito Userpool region
-
Navigate to Cognito Federated Identities console and open the amplify_backend_manager_<sample_amplify_App_ID> identity pool, click on 'Edit identity pool' and note down - i. Cognito Identity PoolId
-
In a local terminal, with AWS CLI setup execute the update-backend-config command :
$ aws amplifybackend update-backend-config --app-id <affected_app_id> --login-auth-config AwsCognitoIdentityPoolId=<sample_identity_pool_id>,AwsCognitoRegion=<region>,AwsUserPoolsId=<sample_userpool_id>,AwsUserPoolsWebClientId=<sample_webclient_id>
- Note, if you observe An error occurred (ResourceNotFoundException) when calling the UpdateBackendConfig operation, please re-run the command and it should go through the second time.
-
Next, test whether you are able login (using Launch Studio button on console) into the affected backend environment.
-
Now, you could toggle the Amplify Studio configuration to off and turn it on again to recreate the independent resources like userpool etc.
-
Delete the sample Amplify app directly from console.
I believe it is also possible to work around this by disabling/re-enabling Studio via the toggle in the AWS Console under Studio settings
.
Can you please confirm that fixes it?
I've tried enabling the studio through the settings, but it didn't work.