【发布时间】: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