A complex type that describes the Amazon S3 bucket or the HTTP server (for example, a web server) from which CloudFront gets your files. You must create at least one origin.
For the current limit on the number of origins that you can create for a distribution, see Amazon CloudFront Limits in the AWS General Reference.
A complex type that contains names and values for the custom headers that you want.
Type: CustomHeaders object
A complex type that contains information about a custom origin. If the origin is an Amazon S3 bucket, use the
Type: CustomOriginConfig object
Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want CloudFront to get objects for this origin, for example,
Constraints for Amazon S3 origins:
If you configured Amazon S3 Transfer Acceleration for your bucket, do not specify the
The bucket name must be between 3 and 63 characters long (inclusive).
The bucket name must contain only lowercase characters, numbers, periods, underscores, and dashes.
The bucket name must not contain adjacent periods.
Custom Origins: The DNS domain name for the HTTP server from which you want CloudFront to get objects for this origin, for example,
Constraints for custom origins:
DomainNamemust be a valid DNS name that contains only a-z, A-Z, 0-9, dot (.), hyphen (-), or underscore (_) characters.
The name cannot exceed 128 characters.
A unique identifier for the origin. The value of
Idmust be unique within the distribution.
When you specify the value of
TargetOriginIdfor the default cache behavior or for another cache behavior, you indicate the origin to which you want the cache behavior to route requests by specifying the value of the
Idelement for that origin. When a request matches the path pattern for that cache behavior, CloudFront routes the request to the specified origin. For more information, see Cache Behavior Settings in the Amazon CloudFront Developer Guide.
An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. When you include the
OriginPathelement, specify the directory name, beginning with a
/. CloudFront appends the directory name to the value of
DomainName, for example,
example.com/production. Do not include a
/at the end of the directory name.
For example, suppose you've specified the following values for your distribution:
DomainName: An Amazon S3 bucket named
When a user enters
example.com/index.htmlin a browser, CloudFront sends a request to Amazon S3 for
When a user enters
example.com/acme/index.htmlin a browser, CloudFront sends a request to Amazon S3 for
A complex type that contains information about the Amazon S3 origin. If the origin is a custom origin, use the
Type: S3OriginConfig object
For more information about using this API in one of the language-specific AWS SDKs, see the following: