0

Storing data in Amazon's S3. Some of the data is for public viewing, and some is for private.

I'd rather have everything in S3 marked as private, and enforce viewing constraints through my web app. S3's api let's you generate a signed URL to access private data for a limited time.

What I'd like:

  • Public request for mycdn.com/public_content_a
  • CDN Edge server contacts example.org/public_content_a, which 3xx redirects to s3.amazonaws.com/public_content_a
  • Future requests for mycdn.com/public_content_a return the cached content from S3
  • At no time, does the actual content pass through example.org, only the redirect
  • Large cache-expire time

For private content, it would be similar, only I'd set the cache-expiration time to be much sooner.

Is something like this possible? How close can I get to this?

1 Answers1

0

If you're setting up a pull zone, you will able to define the origin server. In this case you wouldn't use example.org at all through your CDN.

mycdn.com would be a pull zone for the origin server at s3.amazonaws.com and any request to mycdn.com would be first checked for cached content. If the cache is expired or doesn't exist the request would be pulled from your origin server and piped to the end user in one go in a proxied manner.

At no time would your origin URL be exposed to the end user negating the need for you to set up a webapp in the middle or have a 300 redirect.

This is the case with every CDN I've ever used with pull zones.

sjdaws
  • 206
  • 1
  • 5