AWS Secure CloudFront Origin Bucket (for CDK v2)
An AWS CDK construct library to create secure S3 buckets for CloudFront origin.
Install
TypeScript
npm install @gammarer/aws-secure-cloudfront-origin-bucket
# or
yarn add @gammarer/aws-secure-cloudfront-origin-bucket
# or
pnpm add @gammarer/aws-secure-cloudfront-origin-bucket
# or
bun add @gammarer/aws-secure-cloudfront-origin-bucket
Python
pip install gammarer.aws-secure-cloudfront-origin-bucket
C# / .NET
dotnet add package Gammarer.CDK.AWS.SecureCloudFrontOriginBucket
Java
Add the following to pom.xml:
<dependency>
<groupId>com.gammarer</groupId>
<artifactId>aws-secure-cloudfront-origin-bucket</artifactId>
</dependency>
Example
for OAI(Origin Access Identity)
import { SecureCloudFrontOriginBucket, SecureCloudFrontOriginType } from '@gammarer/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 '@gammarer/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.
Metadata
Release files for gammarer.aws-secure-cloudfront-origin-bucket 1.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gammarer.aws-secure-cloudfront-origin-bucket-1.4.4.tar.gz | 44.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gammarer.aws_secure_cloudfront_origin_bucket-1.4.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 87.7 kB
Release files / gammarer.aws-secure-cloudfront-origin-bucket-1.4.4.tar.gz
| Download URL | gammarer.aws-secure-cloudfront-origin-bucket-1.4.4.tar.gz |
|---|---|
| Size | 44.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d71f2c6fcf2b250a099246462ad7e549e6815b1751ef34a37c49813f594c49b
|
|
BLAKE2b-256 checksum How to use checksums |
f564d41f10fafe1685d8a57a77120faf84b28cb347cb63762994f16ba50dfb53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / gammarer.aws_secure_cloudfront_origin_bucket-1.4.4-py3-none-any.whl
| Download URL | gammarer.aws_secure_cloudfront_origin_bucket-1.4.4-py3-none-any.whl |
|---|---|
| Size | 43.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68628f3fd244a048801f82dfad3926a559428bcdec8856a2a9153915be25db49
|
|
BLAKE2b-256 checksum How to use checksums |
41f8067808e0faea0ff1ab0e72968c26bba1d9b2b7a0163a2aa7416905cfaca6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|