interface OriginAccessIdentityProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.CloudFront.OriginAccessIdentityProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#OriginAccessIdentityProps |
Java | software.amazon.awscdk.services.cloudfront.OriginAccessIdentityProps |
Python | aws_cdk.aws_cloudfront.OriginAccessIdentityProps |
TypeScript (source) | aws-cdk-lib » aws_cloudfront » OriginAccessIdentityProps |
Properties of CloudFront OriginAccessIdentity.
Example
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
| Name | Type | Description |
|---|---|---|
| comment? | string | Any comments you want to include about the origin access identity. |
comment?
Type:
string
(optional, default: "Allows CloudFront to reach the bucket")
Any comments you want to include about the origin access identity.

.NET
Go
Java
Python
TypeScript (