AWS::CloudFront::Distribution Origin - AWS CloudFormation

AWS::CloudFront::Distribution Origin

A complex type that describes the Amazon S3 bucket, HTTP server (for example, a web server), Amazon MediaStore, or other server from which CloudFront gets your files. This can also be an origin group, if you’ve created an origin group. You must specify at least one origin or origin group.

For the current quota (limit) on the number of origins or origin groups that you can specify for a distribution, see Quotas in the Amazon CloudFront Developer Guide.

Note

If you use CloudFormation to create a CloudFront distribution and an S3 bucket origin at the same time, the distribution might return HTTP 307 Temporary Redirect responses for up to 24 hours. It can take up to 24 hours for the S3 bucket name to propagate to all AWS Regions. When the propagation is complete, the CloudFront distribution will automatically stop sending these redirect responses; you don’t need to take any action. For more information, see Why am I getting an HTTP 307 Temporary Redirect response from Amazon S3? and Temporary Request Redirection.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

Properties

CustomOriginConfig

Use this type to specify an origin that is a content container or HTTP server, including an Amazon S3 bucket that is configured with static website hosting. To specify an Amazon S3 bucket that is not configured with static website hosting, use the S3OriginConfig type instead.

Required: Conditional

Type: CustomOriginConfig

Update requires: No interruption

DomainName

The domain name for the origin. For more information, see Origin Domain Name in the Amazon CloudFront Developer Guide.

Required: Yes

Type: String

Update requires: No interruption

Id

A unique identifier for the origin. This value must be unique within the distribution.

Use this value to specify the TargetOriginId in a CacheBehavior or DefaultCacheBehavior.

Required: Yes

Type: String

Update requires: No interruption

OriginCustomHeaders

A list of HTTP header names and values that CloudFront adds to requests it sends to the origin. For more information, see Adding Custom Headers to Origin Requests in the Amazon CloudFront Developer Guide.

Required: No

Type: List of OriginCustomHeader

Update requires: No interruption

OriginPath

An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin. For more information, see Origin Path in the Amazon CloudFront Developer Guide.

Required: No

Type: String

Update requires: No interruption

S3OriginConfig

Use this type to specify an origin that is an Amazon S3 bucket that is not configured with static website hosting. To specify any other type of origin, including an Amazon S3 bucket that is configured with static website hosting, use the CustomOriginConfig type instead.

Required: Conditional

Type: S3OriginConfig

Update requires: No interruption

See Also

  • Origin in the Amazon CloudFront API Reference