【问题标题】:When deploying my AWS API Gateway, it fails with "The domain name you provided already exists", but I can't find it anywhere部署我的 AWS API Gateway 时,它失败并显示“您提供的域名已存在”,但我无法在任何地方找到它
【发布时间】:2022-08-19 03:04:16
【问题描述】:

我正在使用 SST,所以它是 CDK 和 CloudFormation,但最终,它尝试创建一个失败并出现此错误的 API 网关:

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

如果我将 URL 从 api.example.com 更改为 api2.example.com 它可以工作。我搜索了 API Gateways 和 CloudFront,但都找不到 api.example.com 正在使用的任何一个。也从来没有尝试过使用它,我尝试过使用它,所以我不知道它为什么会被使用。我也等了超过 24 小时以防万一卡住.

有什么想法可能会在这里发生吗?

  • 检查您的 Route53,也许它用于其他用途?
  • 在 route53 的那个区域中没有该主机名/域(无论你想怎么称呼它)的记录。
  • 我假设这些域名需要在全球范围内是唯一的,是否有可能在另一个帐户或您尚未检查的另一个区域中使用它?
  • 我最近才将该区域添加到 AWS。为了以防万一,我检查了其他几个地区,但什么也没有。 CloudFront 是全球性的,因此需要那里。
  • @stijndepestel 如果您知道更好的检查方法,我认为这就是我的问题的要点。 :)

标签: amazon-cloudformation aws-api-gateway aws-cdk serverless-stack


【解决方案1】:

我有同样的问题。我看到Matt's guidance 并从 Api Gateway > Custom Domains 中删除了域名。它工作后..

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-04-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-20
    • 2022-09-30
    • 2020-05-01
    相关资源
    最近更新 更多