Skip to main content

AWS CloudFront distribution origin S3 bucket.

Project description

AWS Secure CloudFront Origin Bucket (for CDK v2)

GitHub npm (scoped) PyPI Nuget GitHub Workflow Status (branch) GitHub release (latest SemVer)

View on Construct Hub

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file gammarers_aws_secure_cloudfront_origin_bucket-2.1.22.tar.gz.

File metadata

File hashes

Hashes for gammarers_aws_secure_cloudfront_origin_bucket-2.1.22.tar.gz
Algorithm Hash digest
SHA256 ee420f42b860db6a322d3e4e8c48198469a8f82ad2cbd3a826537b19e56508ed
MD5 d3b2b450772c594d694a2b57875cdaf1
BLAKE2b-256 77d31b071e210317d8124d89317bbab6cbdf41fa709704a08288805a680599f0

See more details on using hashes here.

File details

Details for the file gammarers_aws_secure_cloudfront_origin_bucket-2.1.22-py3-none-any.whl.

File metadata

File hashes

Hashes for gammarers_aws_secure_cloudfront_origin_bucket-2.1.22-py3-none-any.whl
Algorithm Hash digest
SHA256 213d73977ee549f4cd25cda37d639c4e29f03d949b752f7c4f2f2061d4b0e974
MD5 c380fe5785856bc330b81695dc57e753
BLAKE2b-256 b6836d083cecb63dc889be7f3aff1f55a78f9d55fdcff098dfccec97da578233

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page