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
originAccessIdentityanyorigin_access_identityanyoriginAccessIdentityanyOriginAccessIdentityanyOriginAccessIdentityany= No Origin Access Identity which …#The optional Origin Access Identity of the origin identity cloudfront will use when calling your s3 bucket.
default
Default: No Origin Access Identity which requires the S3 bucket to be public accessible
originHeaders{ [key: string]: string }origin_headerstyping.Mapping[str, str]originHeadersMap<String, String>OriginHeadersIDictionary<string, string>OriginHeaders*map[string]*string= No additional headers are passed…#Any additional headers to pass to the origin.
default
Default: No additional headers are passed.
The relative path to the origin root to use for sources.
originShieldRegionstringorigin_shield_regionstroriginShieldRegionStringOriginShieldRegionstringOriginShieldRegion*string= origin shield not enabled#When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.