aws-amplify / aws-amplify/amplify-cli
Allow unlinking a Amplify added auth resource
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
### How did you install the Amplify CLI?
npm
### If applicable, what version of Node.js are you using?
_No response_
### Amplify CLI Version
10.6.2
### What operating system are you using?
Mac
### Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes
### Describe the bug
I successfully implemented a new user pool with migration from the old pool in a development environment. I used the CLI to "amplify remove auth", but when I could not push the changes, I read that I needed to "amplify update API" which I did, and then successfully did "amplify push". Migration was working successfully with the old and new pools.
However, when merging the changes and doing an "amplify push" in the production environment, this initially didn't work. After I did an "amplify update api" as I did in the dev environment, followed by an "amplify push", it worked. **Only difference - in the production environment, Amplify decided to delete the user pool!**
The above happened despite the fact that the docs clearly state they will **not** delete the Cognito resource, and the fact that this didn't happen in the development environment.
What's worse is there is no standard way to backup a Cognito user pool.
Please AWS / Amplify team, can you restore the user pool?
### Expected behavior
I expected the CLI to detach from, but not delete, the old user pool.
### Reproduction steps
I haven't tried to replicate this yet, however these should be the steps:
1. Setup a development and production environment with GraphQL and Auth
2. In the development environment, "amplify remove auth", then "amplify update api" and "amplify push"
3. Switch branches (in my case in git), merge changes, and run "amplify update api" and "amplify push"
### Project Identifier
_No response_
### Log output
```
# Put your logs below this line
```
### Additional information
_No response_
### Before submitting, please confirm:
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
Contributor guide
Assessment
This issue has not been assessed yet.