认识
官网:https://aws.amazon.com/cloudfront/
文档:https://docs.aws.amazon.com/cloudfront/#lang/en_us # Developer Guide 面向用户
仓库:
Securely deliver content with low latency and high transfer speeds
组成
—— 该部分将记录 CloudFront 的架构及内部原理,但鉴于我们是用户,且 CloudFront 为黑盒工具,所以我们暂时不去探究 CloudFront 组成及原理。
构造
性质
https://aws.amazon.com/cloudfront/features/
应用
CloudFront 回源 S3
Get started with a basic CloudFront distribution | 该文档演示配置 CloudFront 回源 S3 的方法
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/GettingStarted.SimpleDistribution.html#GettingStartedCreateDistribution
需要留意回源 S3 的 Policy 配置,按照文档操作即可。如果错误配置(未指定策略),则选择 CloudFront 实例,Origins,选中 Origins 配置,Edit,Origin access,并进行后续配置。
清理缓存 | 失效缓存
How to make CloudFront never cache index.html on S3 bucket
通过 Invalidations 功能,来清理缓存。
通过 Behaviors 功能,能够禁用特定目录或文件的缓存。