【发布时间】:2020-08-23 02:39:39
【问题描述】:
这是对此处找到的问题的后续问题:CloudFront + S3 Website: "The specified key does not exist" when an implicit index document should be displayed
我正在尝试通过 S3 托管 React 单页应用程序(静态网站),并且我只想允许 https 访问(使用自定义 SSL)。我已使用 CloudFront 配置了所有内容,并且我的网站在 CloudFront URL 上显示得很好。但是当我浏览应用程序时,我得到了error shown in the link above。
根据该帖子,该错误已通过从 REST 切换到网站端点得到修复。但在此过程中,您必须公开您的 S3 存储桶。我的问题:有没有办法在不切换到网站端点的情况下修复此错误,并在此过程中公开我的所有 S3 内容?在 AWS 生态系统中是否有某种解决方法,我可以将私有 S3 内容与返回 html 文档而没有 XML 格式错误的进程结合起来?根据此参考资料 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html#WebsiteRestEndpointDiff),这似乎是不可能的,但我希望有人能证明我错了。
谢谢!
【问题讨论】:
标签: reactjs amazon-web-services amazon-s3 react-router amazon-cloudfront