【问题标题】:Serverless HTTP API - serverless-domain-manager Error: Failed to find a stack无服务器 HTTP API - serverless-domain-manager 错误:无法找到堆栈
【发布时间】:2022-01-23 00:16:48
【问题描述】:

我正在尝试使用自定义域部署基本的无服务器 express api 示例 - https://github.com/serverless/examples/tree/v2/aws-node-express-api。它使用 HTTP Api 而不是旧的 REST API 网关。 域已成功设置,证书到位等,但是当我运行 serverless deploy 时会引发错误:

Error: Unable to setup base domain mappings for mycustom.domain.name

添加 SLS_DEBUG 显示:

Service Information
-------------------
service: my-service-name
stage: staging
region: us-east-1
stack: my-service-name-staging
resources: 11
api keys:
  None
endpoints:
  ANY - https://123323.execute-api.us-east-1.amazonaws.com
functions:
  api: my-service-name-staging-api
layers:
  None
Serverless: [AWS cloudformation 400 1.296s 0 retries] describeStackResource({
  LogicalResourceId: 'ApiGatewayRestApi',
  StackName: 'my-service-name-staging'
})
Serverless: [AWS cloudformation 200 1.592s 0 retries] describeStacks({})
Serverless Domain Manager: Error: mycustom.domain.name:  Error: Failed to find a stack my-service-name-staging

Serverless Domain Manager: Error: mycustom.domain.name:  Error: Failed to find CloudFormation resources for mycustom.domain.name

显然堆栈存在,但无服务器域管理器找不到它。我不能通过带有 HTTP api 的 serverless-domain-manager 使用自定义域吗?该文档仅显示manual way 来执行此操作。任何帮助将不胜感激,谢谢!

【问题讨论】:

    标签: amazon-web-services express aws-lambda aws-api-gateway serverless-framework


    【解决方案1】:

    如果不查看您的配置,很难回答 100%,但您确定您已在 customDomain 配置部分中指定了 apiType: http 吗?如果不是,则默认为rest。将其设置为 http 应该可以解决您的问题。

    【讨论】:

    猜你喜欢
    • 2020-12-12
    • 1970-01-01
    • 2018-05-21
    • 2021-11-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-25
    相关资源
    最近更新 更多