Skip to main content

AwsCloudFrontServiceModuleOriginSchema

One origin the distribution serves from: a source model, and how CloudFront reaches it.

@group

Modules/Service/AwsCloudFrontService

Index

Properties

optionalconnectionAttempts

connectionAttempts?: number = 3

How many times CloudFront retries the origin before giving up. Between 1 and 3.

optionalconnectionTimeout

connectionTimeout?: number = 10

How long CloudFront waits to establish a connection to the origin, in seconds. Between 1 and 10.

optionalcustomHeaders

customHeaders?: {} = {}

Headers CloudFront adds to every request it sends to the origin.


Type declaration

  • [name string]: string

optionalindexDocument

indexDocument?: string = ''

For a bucket, the file served for a path naming a directory, e.g. index.html: /docs/ and /docs both serve /docs/index.html, as a bucket website would. Octo creates a CloudFront Function, <distributionName>-<originId>-index, that every route to this origin runs on viewer requests. Empty for none.

originId

originId: string

A name you choose for this origin, e.g. site. Routes refer to it. Unique across origins.

optionaloriginPath

originPath?: string = ''

A path CloudFront prefixes to every request it sends to the origin, e.g. /public.

source

source: Service | Execution

The model to serve. Supported: a bucket produced by AwsS3StorageServiceModule, an ALB produced by AwsEcsAlbServiceModule, served over HTTP, and a Lambda function produced by AwsLambdaExecutionModule, served through its URL. CloudFront waits 60 seconds for the function, so its timeout must be no longer.