S3OriginConfig Struct
S3 origin configuration for CloudFront.
Example
ts
declare const sourceBucket: s3.Bucket;
const viewerCertificate = cloudfront.ViewerCertificate.fromIamCertificate('MYIAMROLEIDENTIFIER', {
aliases: ['MYALIAS'],
});
new cloudfront.CloudFrontWebDistribution(this, 'MyCfWebDistribution', {
originConfigs: [
{
s3OriginSource: {
s3BucketSource: sourceBucket,
},
behaviors : [ {isDefaultBehavior: true} ],
},
],
viewerCertificate: viewerCertificate,
});
Properties
originAccessIdentityoptionalanyorigin_access_identityoptionalanyoriginAccessIdentityoptionalanyOriginAccessIdentityoptionalanyOriginAccessIdentityoptionalany#The optional Origin Access Identity of the origin identity cloudfront will use when calling your s3 bucket.
Default: No Origin Access Identity which requires the S3 bucket to be public accessible
originHeadersoptional{ [key: string]: string }origin_headersoptionaltyping.Mapping[str, str]originHeadersoptionalMap<String, String>OriginHeadersoptionalIDictionary<string, string>OriginHeadersoptional*map[string]*string#Any additional headers to pass to the origin.
Default: No additional headers are passed.
originPathoptionalstringorigin_pathoptionalstroriginPathoptionalStringOriginPathoptionalstringOriginPathoptional*string= /#The relative path to the origin root to use for sources.
originShieldRegionoptionalstringorigin_shield_regionoptionalstroriginShieldRegionoptionalStringOriginShieldRegionoptionalstringOriginShieldRegionoptional*string#When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.
Default: origin shield not enabled