OriginAccessIdentityProps Struct
Properties of CloudFront OriginAccessIdentity.
Example
ts
const myBucket = new s3.Bucket(this, 'myBucket');
const myOai = new cloudfront.OriginAccessIdentity(this, 'myOAI', {
comment: 'My custom OAI'
});
const s3Origin = origins.S3BucketOrigin.withOriginAccessIdentity(myBucket, {
originAccessIdentity: myOai
});
new cloudfront.Distribution(this, 'myDist', {
defaultBehavior: {
origin: s3Origin
},
});
Properties
commentoptionalstringcommentoptionalstrcommentoptionalStringCommentoptionalstringCommentoptional*string#Any comments you want to include about the origin access identity.
Default: "Allows CloudFront to reach the bucket"