awslabs / aws-support-tools

Tools and sample code provided by AWS Premium Support.
https://aws.amazon.com/premiumsupport/
Apache License 2.0
1.46k stars 801 forks source link

MWAA verify_env script doesn't correctly identify available endpoints #204

Open daniel-bowman-nationwide opened 2 years ago

daniel-bowman-nationwide commented 2 years ago

https://github.com/awslabs/aws-support-tools/blob/2a9b97097a0851b674905e475958904ad6204d34/MWAA/verify_env/verify_env.py#L682

In the above line of code the all() method causes the endpoint identification to fail if the endpoint is attached to more subnets than the environment is attached to. The correct approach would be to subtract the subnets the endpoint has from the subnets the environment has and ensure there are none remaining for the environment.