Search code examples
amazon-web-servicesamazon-cloudfront

Cloudfront, files from member area


I am currently testing amazon cloudfront, it seems to be a nice cdn tool. Btw, I see the cdn handle the file from the "public area" but it there a way to store files only available in a member area ? Only files like css, js (...) that we don't need to protect but only loaded in member area?

Thanks.


Solution

  • I guess you are talking about serving private CloudFront content to your member, but not to public ?

    If yes, AWS supports that in CloudFront.

    But you need to do either "signed url" or "signed cookie" method to access the cloudfront assets. ( of course, you need to setup your cloudfront and S3 )

    1. Signed URL means URL will have query string with signed auth parameters.
    2. Signed Cookie means those signed auth parameters are save in cookies.

    And AWS also support custom policy if you have very complicated policy for your CDN.

    You can access this link for more info

    http://docs.aws.amazon.com/aws-sdk-php/guide/latest/service-cloudfront.html