In my case, I just removed a custom domain name that was forgotten in my Api Gateway, and after about 2 minutes I was able to delete the certificate.