Skip to content

This project provides a CDK construct to create an S3 Bucket with some security pre-sets.

License

Notifications You must be signed in to change notification settings

pepperize/cdk-private-bucket

Repository files navigation

PRs Welcome GitHub npm (scoped) PyPI Nuget Sonatype Nexus (Releases) GitHub Workflow Status (branch) GitHub release (latest SemVer)

AWS CDK Private Bucket

This project provides a CDK construct to create an S3 Bucket with some security pre-sets. It uses usual s3.BucketProps and overrides these key-value pairs:

{
  blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL,
  enforceSSL: true,
  encryption: s3.BucketEncryption.S3_MANAGED,
}

The result is a privacy-oriented S3 Bucket.

Install

TypeScript

npm install @pepperize/cdk-private-bucket

or

yarn add @pepperize/cdk-private-bucket

Python

pip install pepperize.cdk-private-bucket

C# / .Net

dotnet add package Pepperize.CDK.PrivateBucket

Java

<dependency>
  <groupId>com.pepperize</groupId>
  <artifactId>cdk-private-bucket</artifactId>
  <version>${cdkPrivateBucket.version}</version>
</dependency>

Example

npm install @pepperize/cdk-private-bucket

See API.md.

import { PrivateBucket } from "@pepperize/cdk-private-bucket";

const bucket = new PrivateBucket(this, "PrivateBucket", {});