An AWS CDK construct library to create secure S3 buckets for CloudFront origin.
Warning
v2.1.0: remove origin access identity(oai) support
npm install @gammarers/aws-secure-cloudfront-origin-bucket
yarn add @gammarers/aws-secure-cloudfront-origin-bucket
pnpm add @gammarers/aws-secure-cloudfront-origin-bucket
bun add @gammarers/aws-secure-cloudfront-origin-bucket
pip install gammarers.aws-secure-cloudfront-origin-bucket
dotnet add package gammarers.CDK.AWS.SecureCloudFrontOriginBucket
import { SecureCloudFrontOriginBucket, SecureCloudFrontOriginType } from '@gammarers/aws-secure-cloudfront-origin-bucket';
const originBucket = new SecureCloudFrontOriginBucket(stack, 'SecureCloudFrontOriginBucket', {
bucketName: 'example-origin-bucket',
});
const distribution = new cloudfront.Distribution(this, 'Distribution', {
defaultRootObject: 'index.html',
defaultBehavior: {
origin: origins.S3BucketOrigin.withOriginAccessControl(originBucket),
},
});
This project is licensed under the Apache-2.0 License.