aws-amplify / aws-amplify/amplify-hosting
Backend branches are not auto-disconnected
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-console/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-console/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-console/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
### App Id
199667997825
### Region
us-west-2
### Amplify Console feature
Backend builds, Build settings
### Describe the bug
We're using the "Branch autodetection" and "Branch auto-disconnection" features to create preview deployments for our PRs.
When a PR is merged and the branch is deleted; the frontend deployment is correctly removed, but the backend environment is not. This causes many unused backends to pile up in our app, which in turn causes us to hit resource quota limits.
We worked around this issue for a little while by requesting a quota increase for S3 buckets, but now we are getting errors that we've exhausted our quota for GraphQL APIs.
Someone (me) has to go through the app every few days and manually delete unused backends, which is time-consuming and a resource drain.
### Expected behavior
The "Branch auto-disconnection" feature should apply to backend environments as well as frontends.
### Reproduction steps
1. Enable "Branch autodetection" and select "Create new backend environment for every connected branch"
2. Create a branch
3. Wait for it to deploy
4. Delete the branch
5. Observe that the backend environment still exists
### Build Settings
_No response_
### Additional information
_No response_
Contributor guide
Research direction
Start with the Branch autodetection and Branch auto-disconnection settings described in the reproduction steps, then reproduce the behavior by creating, deploying, and deleting a branch. Done means deleting a connected branch also removes its backend environment, avoiding leftover resources such as S3 buckets and GraphQL APIs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100