AWS CloudFront distribution origin S3 bucket.
Project description
AWS Secure CloudFront Origin Bucket (for CDK v2)
An AWS CDK construct library to create secure S3 buckets for CloudFront origin.
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 OAI(Origin Access Identity)
import { SecureCloudFrontOriginBucket, SecureCloudFrontOriginType } from '@gammarers/aws-secure-cloudfront-origin-bucket';
const oai = new cloudfront.OriginAccessIdentity(stack, 'OriginAccessIdentity');
new SecureCloudFrontOriginBucket(stack, 'SecureCloudFrontOriginBucket', {
bucketName: 'example-origin-bucket',
cloudFrontOriginType: SecureCloudFrontOriginType.ORIGIN_ACCESS_IDENTITY,
cloudFrontOriginAccessIdentityS3CanonicalUserId: oai.cloudFrontOriginAccessIdentityS3CanonicalUserId,
});
for OAC(Origin Access Control)
import { SecureCloudFrontOriginBucket, SecureCloudFrontOriginType } from '@gammarers/aws-secure-cloudfront-origin-bucket';
declare const distribution: cloudfront.Distribution;
new SecureCloudFrontOriginBucket(stack, 'SecureCloudFrontOriginBucket', {
bucketName: 'example-origin-bucket',
cloudFrontOriginType: SecureCloudFrontOriginType.ORIGIN_ACCESS_CONTROL,
cloudFrontArn: `arn:aws:cloudfront::123456789:distribution/${distribution.distributionId}`,
});
License
This project is licensed under the Apache-2.0 License.
Project details
Release history Release notifications | RSS feed
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-1.6.14.tar.gz
.
File metadata
- Download URL: gammarers_aws_secure_cloudfront_origin_bucket-1.6.14.tar.gz
- Upload date:
- Size: 44.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b930ac2136aa2a3d9b12df15a7f27d1b70ae16e3b3dd596ebbe85411b832dbc4 |
|
MD5 | e3df7a0f1c0ab5d489312173395709b9 |
|
BLAKE2b-256 | 8253e7f0c34af010c54ec38d2611b1ea011f7081e841a4bb2f592c23eb1c6aba |
File details
Details for the file gammarers.aws_secure_cloudfront_origin_bucket-1.6.14-py3-none-any.whl
.
File metadata
- Download URL: gammarers.aws_secure_cloudfront_origin_bucket-1.6.14-py3-none-any.whl
- Upload date:
- Size: 43.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 764c22ca57231a1a51be1dece4c76c52d74d51c426b3d630d44064ba9b40518c |
|
MD5 | 13d8f714cae6384f880722df2b0d62f9 |
|
BLAKE2b-256 | 629de2e820de6f5a181b1017536b98332230cc332392618c0cf2b4e404431fd5 |