class S3Origin
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.CloudFront.Origins.S3Origin | 
|  Java | software.amazon.awscdk.services.cloudfront.origins.S3Origin | 
|  Python | aws_cdk.aws_cloudfront_origins.S3Origin | 
|  TypeScript (source) | @aws-cdk/aws-cloudfront-origins»S3Origin | 
Implements
IOrigin
An Origin that is backed by an S3 bucket.
If the bucket is configured for website hosting, this origin will be configured to use the bucket as an HTTP server origin and will use the bucket's configured website redirects and error handling. Otherwise, the origin is created as a bucket origin and will use CloudFront's redirect and error handling.
Example
// Adding an existing Lambda@Edge function created in a different stack
// to a CloudFront distribution.
declare const s3Bucket: s3.Bucket;
const functionVersion = lambda.Version.fromVersionArn(this, 'Version', 'arn:aws:lambda:us-east-1:123456789012:function:functionName:1');
new cloudfront.Distribution(this, 'distro', {
  defaultBehavior: {
    origin: new origins.S3Origin(s3Bucket),
    edgeLambdas: [
      {
        functionVersion,
        eventType: cloudfront.LambdaEdgeEventType.VIEWER_REQUEST,
      },
    ],
  },
});
Initializer
new S3Origin(bucket: IBucket, props?: S3OriginProps)
Parameters
- bucket IBucket
- props S3Origin Props 
Methods
| Name | Description | 
|---|---|
| bind(scope, options) | The method called when a given Origin is added (for the first time) to a Distribution. | 
bind(scope, options)
public bind(scope: Construct, options: OriginBindOptions): OriginBindConfig
Parameters
- scope Construct
- options OriginBind Options 
Returns
The method called when a given Origin is added (for the first time) to a Distribution.
