@gammarers/aws-secure-cloudfront-origin-bucket
v2.1.3
Published
AWS CloudFront distribution origin S3 bucket.
Downloads
1,412
Readme
AWS Secure CloudFront Origin Bucket (for CDK v2)
An AWS CDK construct library to create secure S3 buckets for CloudFront origin.
[!WARNING] v2.1.0: remove origin access identity(oai) support
Install
TypeScript
install by npm
npm install @gammarers/aws-secure-cloudfront-origin-bucket
install by yarn
yarn add @gammarers/aws-secure-cloudfront-origin-bucket
install by pnpm
pnpm add @gammarers/aws-secure-cloudfront-origin-bucket
install by bun
bun add @gammarers/aws-secure-cloudfront-origin-bucket
Python
pip install gammarers.aws-secure-cloudfront-origin-bucket
C# / .NET
dotnet add package gammarers.CDK.AWS.SecureCloudFrontOriginBucket
Example
for OAC(Origin Access Control)
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),
},
});
License
This project is licensed under the Apache-2.0 License.