Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When deploying my AWS API Gateway, it fails with "The domain name you provided already exists", but I can't find it anywhere

I'm using SST, so it's CDK and CloudFormation, but ultimately, it tries to created an API Gateway that fails with this error:

The domain name you provided already exists. (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException; Request ID: c34b4b87-97be-4e5f-b0cc-1e041e49e797; Proxy: null)

If I change the URL from api.example.com to api2.example.com it works. I searched API Gateways and CloudFront and I can't find api.example.com being used in either. Also never before trying to use it for this I tried to use it, so I don't know why it would have been in use. I also waited more than 24hs in case something was stuck.

Any ideas what might be going on here?

like image 227
pupeno Avatar asked Oct 26 '25 15:10

pupeno


1 Answers

I had the same problem. I saw Matt's guidance and removed the domain name from Api Gateway > Custom Domains. It worked after..

like image 65
user007 Avatar answered Oct 28 '25 04:10

user007