当我尝试通过设置域时无服务器域管理器 https://github.com/amplify-education/serverless-domain-manager with sls create_domain
,失败并显示:
BadRequestException:您提供的域名已与现有 CloudFront 分配关联。
从现有 CloudFront 分配中删除域名或使用其他域名。
如果您拥有此域名并且未在现有 CloudFront 分配上使用它,请联系支持人员。 api.example.com 未创建。
我追踪到库发生故障的行 https://github.com/amplify-education/serverless-domain-manager/blob/master/index.js#L271.
请注意,我的帐户在 CloudFront 中没有任何内容。这是我打开它时看到的:
It's also interesting that in Certificate Manager, it says that the certificate is in use:
在关联资源下,我可以看到 cloudfront 的条目:arn:aws:cloudfront:: ...
感谢马特的指导 https://stackoverflow.com/a/46572304/592641我找到了导致 CloudFront 发行版出现幻影的原因。在 AWS 控制台中,转到:
Amazon API Gateway > 自定义域名
删除那里所有冲突的域并再次重做部署步骤。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)