Dynamic Content & Advance Features
Dynamic Content and Advance Features
Below are some advance Feature that are being used while using CloudFront for cache Web content and serving user request.
Dynamic Content, Multiple Origin and Cache behaviors:
An Amazon Cloud Front uses Distribution for serving dynamic Content for that it uses more than one origin server.
Those Servers which serves the Client request, on-behalf of Origin Servers are called cache Servers. And when we use a particular feature to control, which content are to be served by which origin and how requests are cached, this feature is called as cache behaviors.
A Cache behavior lets you configure lots of CloudFront functionalities for given URL.
One Cache behavior applies to all PHP files in a Web Server, using path pattern *.php. While Other Behavior applies to all JPEG images in origin server using path pattern *.jpg.
Below are some functions that you configure for each cache behavior:
- The path Pattern
- Which Origin Server to forward your request to
- Whether to forward query strings to your Origin
- Weather accessing the specified files requires Signed URLs
- Weather to require HTTPS access
Using Cache Behaviors and Multiple Origins, we can use Cloud Front to serve our whole Website and also support different behaviors for different client devices or requests.
Some Organization want to restrict access to certain content of their Website for some selected requestors via Amazon CloudFront like Paid Subscribers, users in their company. Amazon Cloud Front provides several mechanisms to perform this actions.
- Signed URL: Use URL that are valid only between certain times and optionally from certain IP address.
- Signed Cookies: Require Authentication via Public key pairs.
- Origin Access Identities (OAI): Restrict access to an Amazon S3 bucket only to a special Amazon CloudFront user associated with your distribution. This is the easiest way to ensure that content in a bucket is accessed by only Amazon CloudFront.