Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot delete an environment #2369

Closed
OlgaMaslova opened this issue Nov 5, 2021 · 16 comments
Closed

Cannot delete an environment #2369

OlgaMaslova opened this issue Nov 5, 2021 · 16 comments
Labels
archived This issue has been locked. bug Something isn't working console The issue is related to performing an action in the Amplify console pending-prioritization Added to the backlog. Pending prioritization. transferred This issue was transferred from another Amplify project

Comments

@OlgaMaslova
Copy link

OlgaMaslova commented Nov 5, 2021

Which Category is your question related to?

Delete an environment. I want to completely remove an existing environment. Through console, I chose Delete that resulted int th following error:
Deletion failed ValidationException - An error occurred while processing your request: null

Amplify CLI Version

6.3.1

AppID and Region
do5lfh5kuwuas, eu-west-1

What AWS Services are you utilizing?
Amplify console

Provide additional details e.g. code snippets
image

@josefaidt
Copy link

Hey @OlgaMaslova 👋 thanks for raising this! I'm going to transfer this to https://github.com/aws-amplify/amplify-console to get more eyes on it

@arundna arundna transferred this issue from aws-amplify/amplify-cli Nov 8, 2021
@github-actions
Copy link

github-actions bot commented Nov 8, 2021

Hi 👋, thanks for opening! While we look into this...

If this issue is related to custom domains, be sure to check the custom domains troubleshooting guide to see if that helps. Also, there is a more general troubleshooting FAQ that may be helpful for other questions.

Lastly, please make sure you've specified the App ID and Region in the issue!

@arundna arundna added the transferred This issue was transferred from another Amplify project label Nov 8, 2021
@ghost
Copy link

ghost commented Nov 9, 2021

Hi @OlgaMaslova 👋🏽, sorry you're experiencing this.

Can you try running delete-backend --app-id <value> --backend-environment-name <value> and see what output you get?

ref: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/amplifybackend/delete-backend.html

@ghost ghost added the console The issue is related to performing an action in the Amplify console label Nov 9, 2021
@jamescrowley
Copy link

jamescrowley commented Nov 10, 2021

I have the same issue. I received

{
    "AppId": "XXXXX",
    "BackendEnvironmentName": "dev",
    "JobId": "00bcda37-3391-46a1-8b0a-559a70475811",
    "Status": "PENDING"
}

when running delete-backend from the CLI. and then

An error occurred (ValidationException) when calling the GetBackend operation: ValidationException - An error occurred while processing your request: null

when running get-backend

@OlgaMaslova
Copy link
Author

OlgaMaslova commented Nov 10, 2021

Hi @hloriana ,

here is what I see after running delete-backend:
{ "AppId": "do5lfh5kuwuas", "BackendEnvironmentName": "prod", "JobId": "b26061a6-3c3d-4e31-be40-bcbf3cb1663c", "Status": "PENDING" }

@ghost
Copy link

ghost commented Nov 10, 2021

Thank you @OlgaMaslova and @jamescrowley for providing us this information. Does this behavior happen when attempting to delete other backend environments or is this a random occurrence?

I just deleted some backend environments using both methods and didn't run into this issue. It would be super helpful if either of you could provide reproduction steps so I can understand what's causing this.

Finally, try this command amplify env remove <env-name> and see if that gives you any more information.

@OlgaMaslova
Copy link
Author

@hloriana amplify env remove <env-name> gives No environment found with the corresponding name provided.

For other envs everything was ok. The only difference is that when creating this enviroment with amplify add env I cancelled the procedure with ctrl-c in the middle since I realized that I was missing some files... I guess since the creation was aborted the environment is in somewhat unfinished state now...

@ghost
Copy link

ghost commented Nov 10, 2021

@OlgaMaslova Okay last thing, can you look in the CloudFormation console and see if the stack associated with that environment still exists?

@ghost
Copy link

ghost commented Nov 10, 2021

Reproduction Steps:

  1. Start to create a backend environment via the CLI
  2. Cancel the action when the initializing... message shows up.
  3. Notice the action will be aborted but the environment is listed in the console.
  4. Delete the environment via the console. Notice the process fails with Deletion failed ValidationException.

Marking as bug.

@abhi7cr abhi7cr added the bug Something isn't working label Nov 10, 2021
@OlgaMaslova
Copy link
Author

OlgaMaslova commented Nov 12, 2021

@hloriana yes, I have only this:
image

@jamescrowley
Copy link

jamescrowley commented Nov 16, 2021

In case it's helpful to anyone - I was able to work around the issue by deleting the parent cloud formation stack directly, then deleting the back-end environment in amplify, and then deleting the connected branch to remove the front-end environment.

@Lorenzohidalgo
Copy link

Lorenzohidalgo commented Jul 28, 2022

hey @hloriana @josefaidt ,

I encountered the same issue, but in my case, the production environment of another app was deleted. how can I recover/restore this?? I've opened a separate issue with more details #2891

@johnpc
Copy link

johnpc commented Sep 27, 2022

As of 9/26/2022 several updates have been released that fix issues deleting apps/backends, including the issue reported here:

Deletion failed ValidationException - An error occurred while processing your request: null

@ghost ghost added s3 pending-prioritization Added to the backlog. Pending prioritization. labels Mar 2, 2023
@ghost ghost removed the s3 label Mar 17, 2023
@nadetastic
Copy link
Member

Related #882

Copy link

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.

Copy link

This issue has been automatically locked.

@github-actions github-actions bot added the archived This issue has been locked. label Mar 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This issue has been locked. bug Something isn't working console The issue is related to performing an action in the Amplify console pending-prioritization Added to the backlog. Pending prioritization. transferred This issue was transferred from another Amplify project
Projects
None yet
Development

No branches or pull requests

9 participants