skip to Main Content

We have surplus credits on Google Cloud and our infrastructure is hosted on AWS.
However, our CloudFront usage on AWS is proving to be expensive.
As a cost-saving measure, we’re considering utilizing Google CDN for serving our AWS S3 bucket.
For the proof of concept (POC), we’ve configured Google Cloud CDN having load balancer
(note that the architecture differs as Google Cloud CDN uses load balancing features).

We’ve also specified the test bucket’s S3 object that we intend to serve.
However, for some reason, requests to the load balancer IP are being redirected to the official page of AWS S3 services, which is unexpected.

What I Tried?

I have created an origin along with load balancing and a network endpoint for the AWS S3 bucket on google cloud.
However, it’s not working as expected; hitting the load balancer IP of Google Cloud should point to the AWS S3 endpoint instead of the official AWS S3 page.

2

Answers


  1. If you make your S3 bucket public and act as an HTTP server you will have access to your content using an URL like https://[mybucket].s3-website-[region].amazonaws.com/.

    I see no reason why you could not use this URL with Google CDN. The load balancer aspect sounds unnecessary though.

    AWS will charge you for the egress traffic (ie. content leaving AWS and going to Google). If your cache hit ratio is good it will be marginal.

    Login or Signup to reply.
  2. Have you tried using the v4 token signing process on Cloud CDN? No need to expose your S3 bucket publicly. This will generate an emphemal access token to access a private AWS S3 bucket using your AWS IAM credentials.

    One thing to be mindful of is by default, Cloud CDN will be sending the "published hostname" towards the origin destination, aka the hostname value that the end user is interacting with. You need to do a HOST header override with the S3 FQDN domain name on the backend service on the Internet NEG you created to talk to S3.

    Media CDN makes this much easier using a v4 token; however, Media CDN is still a restricted offering at the moment.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search