amplify-hosting
amplify-hosting copied to clipboard
Unable to delete Amplify backend environment
** 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?
Can you share your appId/region?
Are you able to delete the baackend environment through the console?:

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:

Where do the options from this dropdown come from?
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
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.
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

I have the same issue here


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
I have the same problem. Is there any progress?
I have the same problem. Is there any progress?
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 - this fixes it for me, but the AWS console should also do this
@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 - yes, this is what happened to mine. Using the aws cli seems to fix it.
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.
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 :)))
no progress? same problem here!
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
We have since fixed this issue. Resolving.
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.
This issue has been automatically locked.