amplify-hosting icon indicating copy to clipboard operation
amplify-hosting copied to clipboard

Unable to delete Amplify backend environment

Open apiel51 opened this issue 5 years ago • 15 comments
trafficstars

** Please describe which feature you have a question about? ** Deleting unused backend environment

** Provide additional details** I'm trying to remove a deprecated amplify backend environment, but I am getting a "The specified bucket does not exist." error whenever I try to use amplify pull to pull the environment so I can delete it. I don't have any resources related to this environment (all deleted) but it doesn't seem like I can delete the environment itself. What's the best way to get around this?

apiel51 avatar Jul 22 '20 16:07 apiel51

Can you share your appId/region?

Are you able to delete the baackend environment through the console?:

image

ganipcanot avatar Jul 22 '20 17:07 ganipcanot

Sure. App ID is d25h3g71gr2w1w region is us-west-2 . So I was able to delete the environment using the solution outlined here but I am now trying to reprovision an environment with the same name (start new) but the deleted environment (prod) is still showing up as an existing environment when trying to link a branch: image

Where do the options from this dropdown come from?

apiel51 avatar Jul 22 '20 17:07 apiel51

Looking at the network requests it appears that they should be coming from a request to https://us-west-2.console.aws.amazon.com/amplify/api/amplify with an operation value of listBackendEnvironemnts. The response from this request is correct and only contains the two backend environments that still exist (dev and master). Perhaps this is some sort of caching bug? @ganipcanot

Update: Tried selecting "Create new environment" and using name "prod" and I get the same NoSuchBucket exception when attempting to deploy

Update 2: Failed deploy created an S3 bucket that is displayed in the S3 console, but hit a 404 when trying to access or delete it

apiel51 avatar Jul 22 '20 18:07 apiel51

Having the same issue, and there is no useful error message at all. The backend environment in question was automatically created by a PR Review. The PR was closed and deleted and now the backend is stuck and won't go away.

marlonmarcello avatar Jan 06 '21 02:01 marlonmarcello

I am also facing the same issue on Amplify Console. I am not able to delete the whole app or the backend environment on the following configuration:-

  • Region: us-east-1
  • App ID: dpjxh4jhr63k2

image

sharmaadityaHQ avatar Feb 16 '21 20:02 sharmaadityaHQ

I have the same issue here

image

image

I can't delete any app on admin panel. I already delete the entire stack and I still can't delete the apps

Region: us-east-2 App ID: djf1iamwbw9t8 , dsh8fgin8n8qt, dt0rmlwxgppn, d3porshd7yfvix, d104mdex2jh3pt

gilvaju avatar Mar 09 '21 12:03 gilvaju

I have the same problem. Is there any progress?

cnbrkkaya avatar Jun 03 '21 07:06 cnbrkkaya

I have the same problem. Is there any progress?

PabloLION avatar Sep 19 '21 12:09 PabloLION

Have you tried the suggestion here: https://github.com/aws-amplify/amplify-console/issues/1330#issuecomment-739493860

Specifically: aws amplify delete-backend-environment --app-id <YOUR_APP_ID> --environment-name <THE_BACKEND_ENVIRONMENT_NAME>

ganipcanot avatar Nov 10 '21 22:11 ganipcanot

@ganipcanot - this fixes it for me, but the AWS console should also do this

michaelbrewer avatar Dec 03 '21 02:12 michaelbrewer

@apiel51 @marlonmarcello @sharmaaditya570191 @gilvaju @cnbrkkaya @PabloLION

Could any of you please confirm if you attempted to delete the backends via CloudFormation first before attempting a delete via the AWS Console? Also, have you tried the workaround suggested here: #1330 (comment) and did that resolve your issue?

We are currently unable to reproduce the issue correctly. I would really appreciate if any of you could provide detailed reproduction steps, so I can investigate this properly.

Narrator avatar Dec 06 '21 19:12 Narrator

@Narrator - yes, this is what happened to mine. Using the aws cli seems to fix it.

michaelbrewer avatar Dec 06 '21 19:12 michaelbrewer

Having the same problem for almost 2 months, there is no trace left of any resource that backs the Amplify projects anymore, no CloudFormation, no nothing, how it is possible that no one can fix this... so annoying.

smoothness avatar Dec 26 '21 14:12 smoothness

Having the same problem for almost 2 months, there is no trace left of any resource that backs the Amplify projects anymore, no CloudFormation, no nothing, how it is possible that no one can fix this... so annoying.

Same and I cant delete certificate for something I used :)))

ocbrollingpaper avatar Dec 31 '21 18:12 ocbrollingpaper

no progress? same problem here!

danielqba avatar Feb 05 '22 04:02 danielqba

This is what worked for me.

open AWS CloudShell and run cmd: aws amplify delete-app --app-id <your_app-id> you can find amplify app id at amplify app detail

Credit due: https://stackoverflow.com/a/70894285/11705601

ZachMurray avatar Dec 14 '22 17:12 ZachMurray

We have since fixed this issue. Resolving.

swaminator avatar Mar 20 '24 20:03 swaminator

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.

github-actions[bot] avatar Mar 20 '24 20:03 github-actions[bot]

This issue has been automatically locked.

github-actions[bot] avatar Mar 20 '24 21:03 github-actions[bot]