gpt4 book ai didi

aws-cloudformation - 使用带有自定义域的无服务器和无服务器域管理器时出现证书问题

转载 作者:行者123 更新时间:2023-12-03 17:01:49 27 4
gpt4 key购买 nike

我正在尝试设置 custom domain用于我的 API 网关和 Lambda 函数。

我注册了一个域名 route53 。例如:myDomainToTestApi.net

我还为以下对象创建了证书:myDomainToTestApi.net、*.myDomainToTestApi.net、www.myDomainToTestApi.net

我安装了插件serverless-domain-manager对于 serverless framerwork

在我的serverless.yml我添加了(在自定义下):

 customDomain:
domainName: myDomainToTestApi.net
basePath: ''
stage: ${opt:stage, 'dev'}
certificateName: '*.myDomainToTestApi.net'
createRoute53Record: true

所有资源都在us-east-1

当我运行时:

sls create-domain

我收到以下错误...

Serverless: Load command test
Serverless: Load command dashboard
Serverless: Invoke create_domain
Serverless: [AWS apigateway 404 0.374s 0 retries] getDomainName({ domainName: 'myDomainToTestApi.net' })
Serverless Domain Manager: NotFoundException: Invalid domain name identifier specified
Serverless: [AWS acm 200 0.35s 0 retries] listCertificates({ CertificateStatuses: [ 'PENDING_VALIDATION', 'ISSUED', 'INACTIVE', [length]: 3 ] })

Error --------------------------------------------------

Error: Error: Could not find the certificate *.myDomainToTestApi.net.
at ServerlessCustomDomain.<anonymous> (/Users/user/project/node_modules/serverless-domain-manager/dist/index.js:279:23)

如果我进入证书管理器 View ,所有状态都是 Issued

有人知道会发生什么吗......?谢谢。

最佳答案

尝试添加另一个名为certificateArn的属性,您可以在域的证书管理器详细 View 中找到certificateArn

certificateArn: 'xxxxx'

enter image description here

关于aws-cloudformation - 使用带有自定义域的无服务器和无服务器域管理器时出现证书问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59619509/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com