
Amazon CloudFront Developer Guide API Version 2012-07-01 Amazon CloudFront Developer Guide Amazon CloudFront: Developer Guide Copyright © 2013 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. The following are trademarks of Amazon Web Services, Inc.: Amazon, Amazon Web Services Design, AWS, Amazon CloudFront, Cloudfront, Amazon DevPay, DynamoDB, ElastiCache, Amazon EC2, Amazon Elastic Compute Cloud, Amazon Glacier, Kindle, Kindle Fire, AWS Marketplace Design, Mechanical Turk, Amazon Redshift, Amazon Route 53, Amazon S3, Amazon VPC. In addition, Amazon.com graphics, logos, page headers, button icons, scripts, and service names are trademarks, or trade dress of Amazon in the U.S. and/or other countries. Amazon©s trademarks and trade dress may not be used in connection with any product or service that is not Amazon©s, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Amazon CloudFront Developer Guide Introduction to Amazon CloudFront ........................................................................................................ 1 CloudFront Concepts .............................................................................................................................. 4 How CloudFront Delivers Content .......................................................................................................... 5 Locations of CloudFront Edge Servers ................................................................................................... 6 Paying for CloudFront ............................................................................................................................. 7 CloudFront or Amazon S3? .................................................................................................................... 8 Getting Started with CloudFront ............................................................................................................. 9 Creating Download Distributions .......................................................................................................... 16 Creating Streaming Distributions .......................................................................................................... 22 Migrating from Amazon S3 to CloudFront ............................................................................................. 26 Working with Distributions .................................................................................................................... 28 Changes to the CloudFront API ............................................................................................................ 28 Overview of Download and Streaming Distributions ............................................................................. 29 Actions on Distributions ........................................................................................................................ 29 Working with Download Distributions ................................................................................................... 30 Working with Streaming Distributions ................................................................................................... 43 Using Alternate Domain Names (CNAMEs) ......................................................................................... 52 Choosing the Price Class for a CloudFront Distribution ........................................................................ 55 Listing, Viewing, and Updating CloudFront Distributions ...................................................................... 55 Deleting a Distribution ........................................................................................................................... 56 Working with Objects ............................................................................................................................ 58 Format of URLs for CloudFront Objects ............................................................................................... 58 How CloudFront Processes HTTP and HTTPS Requests .................................................................... 60 How CloudFront Forwards, Caches, and Logs Query String Parameters ............................................ 61 How CloudFront Forwards, Caches, and Logs Cookies ....................................................................... 62 Adding, Removing, or Replacing Objects in a Distribution ................................................................... 64 Adding Objects to a CloudFront Distribution ............................................................................... 64 Updating Existing Objects Using Versioned Object Names ........................................................ 64 Updating Existing Objects Using the Same Object Names ......................................................... 65 Specifying How Long Objects Stay in a CloudFront Edge Cache (Object Expiration) ................ 65 Invalidating Objects (Download Distributions Only) ..................................................................... 67 How CloudFront Processes Partial Requests for an Object (Range GETs) ......................................... 72 Specifying a Default Root Object (Download Distributions Only) ......................................................... 72 Serving Compressed Files ................................................................................................................... 74 Restricting Access to Objects Based on the Geographic Location of End Users (Geoblocking) .......... 77 Request and Response Behavior, and Supported HTTP Status Codes .............................................. 78 Request and Response Behavior for Amazon S3 Origins .................................................................... 78 Request and Response Behavior, and Supported HTTP Status Codes for Custom Origins ................ 81 Serving Private Content through CloudFront ........................................................................................ 87 Task List: Serving Private Content ........................................................................................................ 91 Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content ................................. 92 Specifying the AWS Accounts That Can Create Signed URLs (Trusted Signers) ................................ 97 Overview of Signed URLs ................................................................................................................... 102 Creating a Signed URL Using a Canned Policy .................................................................................. 106 Creating a Signed URL Using a Custom Policy .................................................................................. 111 Using Linux Commands and OpenSSL for Base64-Encoding and Encryption .................................. 119 Code and Examples for Creating a Signature for a Signed URL ........................................................ 121 Create a URL Signature Using Perl .......................................................................................... 121 Create a URL Signature Using PHP ......................................................................................... 122 Create a URL Signature Using C# and the .NET Framework ................................................... 125 Create a URL Signature Using Java ......................................................................................... 133 Using an HTTPS Connection to Access Your Objects ........................................................................ 136 Using IAM to Control Access to CloudFront Resources ..................................................................... 139 Access Logs ....................................................................................................................................... 143 General Usage Data ........................................................................................................................... 152 Troubleshooting .................................................................................................................................. 153 Load Testing CloudFront ..................................................................................................................... 156 Making API Requests ......................................................................................................................... 157 API Version 2012-07-01 3 Amazon CloudFront Developer Guide Endpoints ............................................................................................................................................ 157 AWS Support for Programming Languages ........................................................................................ 158 REST Requests .................................................................................................................................. 158 REST Responses ............................................................................................................................... 161 Authenticating REST Requests .......................................................................................................... 163 CloudFront Tutorials ...........................................................................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages264 Page
-
File Size-