This package has been deprecated

Author message:

WARNING: This project has been renamed to @gammarers/aws-secure-cloudfront-origin-bucket. Install using @gammarers/aws-secure-cloudfront-origin-bucket instead.

@gammarer/aws-secure-cloudfront-origin-bucket
TypeScript icon, indicating that this package has built-in type declarations

1.4.4 • Public • Published

AWS Secure CloudFront Origin Bucket (for CDK v2)

GitHub npm (scoped) PyPI Nuget Sonatype Nexus (Releases) 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.

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.

Package Sidebar

Install

npm i @gammarer/aws-secure-cloudfront-origin-bucket

Weekly Downloads

310

Version

1.4.4

License

Apache-2.0

Unpacked Size

244 kB

Total Files

8

Last publish

Collaborators

  • yicr