How to force delete an MWAA environment?
Asked Answered
C

1

6

I have updated some Airflow configuration options in my MWAA environment and it has been in "Updating" state for the last three hours!

Does anybody know how to force-delete that environment? Using the "Delete" button on the AWS MWAA console only leads to a "Environments with UPDATING status must complete previous operation before initiating a new operation" message.

Cockshy answered 6/8, 2021 at 19:16 Comment(0)
O
4

You cannot force delete MWAA environment that has Updating or Creating statuses. You will get a warning like Environments with … status must complete the previous operation before initiating a new operation.

The reason of a stuck environment update operation is an improper configuration. You have to fix it.

When en environment is created or updated, MWAA service polls the environment to validate its configuration, e.g. web UI accessibility. Check that your networking is configured properly, following troubleshooting and MWAA networking guides.

In my case the reason was in improper gateways configuration for MWAA environment with public access to web UI: to troubleshoot I have updated public subnet route tables to route 0.0.0.0/0 to an internet gateway instead of NAT gateway (while private subnets should be routed to NAT gateway).

I suggest you to use official CloudFormation template or this Terraform module to properly configure all the resources.

Another way is to wait for timeout of an operation (several hours). However, it will just give you a link to the troubleshooting doc. In case you delete and then recreate the environment with improper configuration again, the operation will be stuck again.

Often answered 19/12, 2021 at 10:26 Comment(4)
some time, the case is for improper configuration of a network, nat gateway, route table. I follow the troubleshooting and MWAA networking guides, but without any success. All this, using the quick start guide.Peevish
how much time you mean several hours?, I was stuck in creating stageShed
@Shed I do not remember exactly, but more than 1 hour for sure. Probably smth around 6.Often
yeah, For me, I had the same problem I messed up with VPC setup, It took 4-5 hoursShed

© 2022 - 2024 — McMap. All rights reserved.