Ryan Graham

Please remove all base path mappings related to the RestApi in your domains’

Sometimes CloudFormation fails to delete a RestAPI in an API Gateway. Finding the base path mapping and deleting it in the AWS Console GUI can be an epic PITA. Fortunately there is a magical incantation for clearing it out: “(none)”

Then go back and delete your stack again.

--

--

Sometimes you go to delete a CloudFormation stack or destroy some Terraform and the run fails to delete an ECR repo because the repository still contains images.

The following resource(s) failed to delete: [ECRRepository].

Here is a quick and dirty way to empty that repo before you retry your delete. Excuse the ugly python. Its a one-off script not a maintained project. 😉

Invoke it like this: ./ecr_purge.py my-ecr-repo-name

Then go back and press delete on your CloudFormation stack and voilà!

--

--