Security abstraction for AWS CDK library. Create AWS resources with best security practices applied for you.
Description
The purpose of this package is to enforce best security practices for AWS
services. It uses AWS CDK
under the hood to create resources and won't without it.
You may find that some of the rules are too strict for your use cases, but you always have a possibility be explicitly overriding them.
Installation
npm i secure-cdk --save-dev
or
yarn add secure-cdk -D
Usage
S3 Bucket
By using createSecureS3Bucket
function to generate your S3 Bucket, you get the following properties set by default.
Property | Value | Description | AWS CDK Default |
---|
enforceSSL | true | Enforces SSL for requests. | false |
publicReadAccess | false | Grants public read access to all objects in the bucket. | false |
import { SecureBucket } from 'secure-cdk';
const mySiteBucket = new SecureBucket(this, 'myBucket', {
bucketName: 'my-bucket-name',
websiteIndexDocument: 'index.html'
});
CloudFront Distribution