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?