Home > Mobile >  Possible to direct S3 URLs to CloudFront CDN?
Possible to direct S3 URLs to CloudFront CDN?

Time:12-14

I have been investigating how Google Cloud and AWS serve assets from their respective storage buckets. I have image assets loading from both providers using signed URLs. It seems that by default GCP will serve assets from its storage buckets using the latest HTTP/3 protocol. AWS, on the other hand appears to only serve assets using 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. The trouble is, I am currently loading assets using their s3 locators and for backwards compatibility I would like to continue referencing these URLs.

AWS has its Route 53 DNS service which will allow custom domains to route to the CloudFront CDN. Is it possible to redirect an s3 bucket's domain to the 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/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. However I have been unable to route s3 URLs to the CDN.

CodePudding user response:

If your s3 urls are in a bucket with static web hosting enabled you can redirect the s3 domain to cloud front domain.

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

  • Related