Interface IS3OriginConfig
S3 origin configuration for CloudFront.
Namespace: Amazon.CDK.AWS.CloudFront
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IS3OriginConfig
Syntax (vb)
Public Interface IS3OriginConfig
Remarks
ExampleMetadata: infused
Examples
Bucket sourceBucket;
var viewerCertificate = ViewerCertificate.FromIamCertificate("MYIAMROLEIDENTIFIER", new ViewerCertificateOptions {
Aliases = new [] { "MYALIAS" }
});
new CloudFrontWebDistribution(this, "MyCfWebDistribution", new CloudFrontWebDistributionProps {
OriginConfigs = new [] { new SourceConfiguration {
S3OriginSource = new S3OriginConfig {
S3BucketSource = sourceBucket
},
Behaviors = new [] { new Behavior { IsDefaultBehavior = true } }
} },
ViewerCertificate = viewerCertificate
});
Synopsis
Properties
OriginAccessIdentity | The optional Origin Access Identity of the origin identity cloudfront will use when calling your s3 bucket. |
OriginHeaders | Any additional headers to pass to the origin. |
OriginPath | The relative path to the origin root to use for sources. |
OriginShieldRegion | When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance. |
S3BucketSource | The source bucket to serve content from. |
Properties
OriginAccessIdentity
The optional Origin Access Identity of the origin identity cloudfront will use when calling your s3 bucket.
virtual IOriginAccessIdentity OriginAccessIdentity { get; }
Property Value
Remarks
Default: No Origin Access Identity which requires the S3 bucket to be public accessible
OriginHeaders
Any additional headers to pass to the origin.
virtual IDictionary<string, string> OriginHeaders { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: - No additional headers are passed.
OriginPath
The relative path to the origin root to use for sources.
virtual string OriginPath { get; }
Property Value
System.String
Remarks
Default: /
OriginShieldRegion
When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.
virtual string OriginShieldRegion { get; }
Property Value
System.String
Remarks
Default: - origin shield not enabled