AwsCloudFrontServiceModuleSchema
Index
Properties
account
The AWS account the distribution is created in.
optionalaliases
The custom domain names the distribution answers on, e.g. docs.example.com.
Each one needs a DNS record pointing at the distribution, which this module does not create.
Leaving this empty serves on the *.cloudfront.net domain CloudFront assigns.
optionalcachePolicies
Custom cache policies, which routes name as { kind: 'custom', name }.
optionalcertificateArn
The ARN of the ACM certificate covering every entry in aliases.
CloudFront only reads certificates from us-east-1. Required when aliases is set.
optionaldefaultRootObject
The object served for a request to the root, e.g. index.html. Empty serves nothing there.
distributionName
The name of the distribution. Changing it replaces the distribution.
optionalerrorResponses
What a viewer gets when an origin answers with an error.
These apply to the whole distribution, not to one route: a rule answering every 404 with
/index.html and a 200, as a single-page app wants, also turns an API's real 404s into a
page of HTML. A distribution serving both should do the single-page-app fallback with an edge
function on the website's route instead. A closed bucket reports a missing file as 403.
optionalfunctions
CloudFront Functions to create, which routes run by functionName.
optionaloriginRequestPolicies
Custom origin request policies, which routes name as { kind: 'custom', name }.
origins
Where the distribution fetches from. See AwsCloudFrontServiceModuleOriginSchema.
optionalpriceClass
Which edge locations serve the distribution, which is what it costs. See ICloudFrontPriceClass.
optionalresponseHeadersPolicies
Custom response headers policies, which routes name as { kind: 'custom', name }.
routes
The routes, each naming an origin. See AwsCloudFrontServiceModuleRouteSchema.
AwsCloudFrontServiceModuleSchemais the input schema for theAwsCloudFrontServiceModulemodule. It describes one CloudFront distribution: its origins, its routes, its error responses, and the domains and certificate it answers on.Modules/Service/AwsCloudFrontService
AwsCloudFrontServiceModule to learn more about the
AwsCloudFrontServiceModulemodule.