简体   繁体   English

可以将 S3 URL 定向到 CloudFront CDN 吗?

[英]Possible to direct S3 URLs to CloudFront CDN?

I have been investigating how Google Cloud and AWS serve assets from their respective storage buckets.我一直在研究 Google Cloud 和 AWS 如何从各自的存储桶中提供资产。 I have image assets loading from both providers using signed URLs.我使用签名 URL 从两个提供商加载图像资产。 It seems that by default GCP will serve assets from its storage buckets using the latest HTTP/3 protocol.似乎默认情况下,GCP 将使用最新的 HTTP/3 协议从其存储桶中提供资产。 AWS, on the other hand appears to only serve assets using HTTP/1.1.另一方面,AWS 似乎只提供使用 HTTP/1.1 的资产。 This makes a big performance difference in an application.这会在应用程序中产生很大的性能差异。

From what I have researched, it seems that AWS promotes the use of its CloudFront CDN to serve assets from S3 buckets using HTTP/3 and edge caching.根据我的研究,似乎 AWS 提倡使用其 CloudFront CDN 来使用 HTTP/3 和边缘缓存为来自 S3 存储桶的资产提供服务。 The trouble is, I am currently loading assets using their s3 locators and for backwards compatibility I would like to continue referencing these URLs.问题是,我目前正在使用他们的 s3 定位器加载资产,为了向后兼容,我想继续引用这些 URL。

AWS has its Route 53 DNS service which will allow custom domains to route to the CloudFront CDN. AWS 有其 Route 53 DNS 服务,该服务将允许自定义域路由到 CloudFront CDN。 Is it possible to redirect an s3 bucket's domain to the CDN?是否可以将 s3 存储桶的域重定向到 CDN? Is there an alternate way to achieve the same goal?是否有其他方法可以实现相同的目标? Any help is appreciated;任何帮助表示赞赏; thank you.谢谢你。

https://aws.amazon.com/blogs.networking-and-content-delivery/amazon-s3-amazon-cloudfront-a-match-made-in-the-cloud/ https://aws.amazon.com/blogs.networking-and-content-delivery/amazon-s3-amazon-cloudfront-a-match-made-in-the-cloud/
https://aws.amazon.com/blogs/aws/new-http-3-support-for-amazon-cloudfront/ https://aws.amazon.com/blogs/aws/new-http-3-support-for-amazon-cloudfront/

I have been able to set up a CloudFront distribution which serves assets from an s3 bucket.我已经能够设置一个 CloudFront 发行版,该发行版为来自 s3 存储桶的资产提供服务。 However I have been unable to route s3 URLs to the CDN.但是我无法将 s3 URL 路由到 CDN。

If your s3 urls are in a bucket with static web hosting enabled you can redirect the s3 domain to cloud front domain.如果您的 s3 网址位于启用了 static web 托管的存储桶中,您可以将 s3 域重定向到云前端域。

https://aws.amazon.com/premiumsupport/knowledge-center/redirect-domain-route-53 https://aws.amazon.com/premiumsupport/knowledge-center/redirect-domain-route-53

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM