首页 > 解决方案 > 为 aws 公共 s3 存储桶创建 DNS URL

问题描述

我想为 aws s3 存储桶提供自定义的 DNS URL。我可以作为 URL 访问我的 s3 存储桶的文件,https://<s3-bucket-name>.s3-ap-southeast-1.amazonaws.com/folder-name/file.png但我想将 URL 提供为https://abc.example.xyz. 不知道我该怎么做。

尝试过的步骤 - 我尝试使用 Route 53 并将其映射abc.example.xyz<s3-bucket-name>.s3-ap-southeast-1.amazonaws.com但没有奏效。

这个桶的目的是存储像jpg和pdf这样的文件,可以通过URL访问。

标签: amazon-s3

解决方案


存储桶名称必须与自定义 DNS 的名称相同,然后 CNAME 在 AWS 路由 53 中运行良好。我创建了一个具有名称的存储桶,abc.example.xyz然后将 CNAMEabc.example.xyzabc.example.xyz.s3-ap-southeast-1.amazonaws.com. 它工作正常。


推荐阅读