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.3.tar.gz.

File metadata

File hashes

Hashes for gammarers_aws_secure_cloudfront_origin_bucket-2.1.3.tar.gz
Algorithm Hash digest
SHA256 5855a9711379d23c72d6302610094d074d852a535c38e1eafbd4c28e4e2abb7a
MD5 b04b2bc67ac904f87366029a540346b2
BLAKE2b-256 b8ff1e58e73feb665fab69afe54bcd09a80e4f84860cb8b680e538a92d2df2f2

See more details on using hashes here.

File details

Details for the file gammarers.aws_secure_cloudfront_origin_bucket-2.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for gammarers.aws_secure_cloudfront_origin_bucket-2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cbac6418b9e3ffc31a2719cbadc2926fa4dc0b8fe7dd150ddd4f8ad688e6bb12
MD5 88022ccdae260a1f8d63c4608023d9a6
BLAKE2b-256 9f097d85bac6cf562c5bb1e0b4b6df6e5e26cf063a1603f420ece1b08509e4f9

See more details on using hashes here.

Supported by

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