Ensure default execute-api endpoint is disabled for your API Gateway.
By default, clients can invoke your API by using the execute-api endpoint that API Gateway generates for your API. To ensure that clients can access your API only by using a custom domain name, disable the default execute-api endpoint.
Modify API Gateway to disable default execute-api endpoint.