首页 > 解决方案 > 通过 CloudFront 和 S3 存储桶静态 Web 托管提供私有动态内容

问题描述

目前我想让我的 SPA 与 S3 存储桶托管一起从 CloudFront 提供服务,同时维护我的 ECS 后端服务器的隐私,该服务器位于私有子网中,内部 ALB 仅侦听来自 S3 存储桶的 API 调用,但是,我明白S3 存储桶不可能从我的后端提供动态内容,因为它是静态的,我是否可以使用 CloudFront 来提供我的后端 API,同时通过设置其行为来保持我的 ALB 为私有?

标签: amazon-web-servicesamazon-s3

解决方案


I have found the answer that according to the documentation of CloudFront, every CloudFront origin must be public and since it has no access to my VPC, setting a "private ALB" as an origin is impossible.


推荐阅读