Route 53 - 创建 A 记录时未显示云端分布

Route 53 - cloudfront distribution not showing when creating A record

我正在我的 Route 53 托管区域中为子域创建 A 记录。当我 select“Cloudfront 分布的别名”时,列表中仅显示美国东部地区,其中包含不需要的分布:

但是我想指出另一个未显示在列表中的发行版。知道为什么它没有显示吗?分发已准备就绪,可以使用指向静态 s3 托管存储桶的云端 URL 进行访问。我使用 amplify cli 托管创建了它,如果重要的话,s3+cloudfront 选项。

感谢您的帮助。

根据评论。

该问题是因为所讨论的 CloudFront 分配没有设置备用域名 与 Route53 中的记录相匹配。来自 docs:

The distribution must include an alternate domain name that matches the domain name that you want to use for your URLs instead of the domain name that CloudFront assigned to your distribution.

即使在部署分发时添加了正确的备用域名,我也遇到过这种情况。这似乎是控制台中的一个错误,因为 copy-pasting 云端域 (id.cloudfront.net) 工作正常。