Describe the bug
With the preview feature, connected to GitHub PRs, resources are not deleted when the PR is merged / closed.
Expected behavior
The aws resources that were created for the preview build should be deleted when the pr is closed.
Additional context
I noticed this because s3 told me I was over the limit of 100 buckets. Indeed, there were dozens of buckets (for storage, deployment and verification) that still existed, for pr's that I had long merged.
@thedgbrt currently the CLI does not delete the deployment S3 buckets so you are manually going to have to merge them. We have a PR out to add support for the deleting the buckets. Will notify you once its out.
Out of curiosity, is there any way manually to get those old branches to clear from the amplify console? Is it just a matter of manually deleting the s3 bucket and everything else will get cleaned up or will doing that break the cleanup process from happening once this PR gets merged?
@swaminator Just wanted to add that Preview environments should also be deleted if a PR is closed (and not merged).
@CaptainChemist what exactly are you seeing?
I am also seeing this. We have preview branches that use an API backend per environment and when pr's are merged and their branches are deleted the appsync backend preview environments are never removed.
@swaminator I'm also not seeing DDB tables as being removed if they have any data in them 鈥斅爄s that also something that will be resolved? I know it's a slightly different deletion policy than standard, but given that DDB tables are limited per account, would be really nice to have without have to go through and manually delete them
Is there an update on this issue? The Amplify PR preview page states that:
After the pull request is closed, the preview URL is deleted, and any ephemeral backend environment linked to the pull request is deleted.
I did note that some PRs got eventually deleted after merging / closing or deleting, and I also don't see any extra S3 buckets (that includes the ones for PRs that are still open, not sure where the docker files are stored).
Just want to be absolutely sure this is working 馃挴 loving Amplify!
Same here, it is really annoying that we have to remove them manually, it loses a bit the meaning of the preview. Also is not valid according to the documentation.
Most helpful comment
I am also seeing this. We have preview branches that use an API backend per environment and when pr's are merged and their branches are deleted the appsync backend preview environments are never removed.