# @aws-solutions-konstruk/core

> Core CDK Construct for patterns library

Latest version **0.8.1** (published 2020-05-21) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @aws-solutions-konstruk/core
pnpm add @aws-solutions-konstruk/core
yarn add @aws-solutions-konstruk/core
bun add @aws-solutions-konstruk/core
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.8.1 |
| Published | 2020-05-21 |
| First published | 2020-03-26 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 25 |
| Unpacked size | 1.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1362 |
| Author | Amazon Web Services |
| Maintainers | aws-solutions-konstruk-support |

## Links

- npm: https://www.npmjs.com/package/@aws-solutions-konstruk/core
- Repository: https://github.com/awslabs/aws-solutions-konstruk
- Homepage: https://github.com/awslabs/aws-solutions-konstruk#readme
- Issues: https://github.com/awslabs/aws-solutions-konstruk/issues
- npm.io page: https://npm.io/package/@aws-solutions-konstruk/core

## Dependencies (25)

- [npmlog](https://npm.io/package/npmlog.md) ^4.1.2
- [deep-diff](https://npm.io/package/deep-diff.md) ^1.0.2
- [deepmerge](https://npm.io/package/deepmerge.md) ^4.0.0
- [@aws-cdk/core](https://npm.io/package/@aws-cdk/core.md) ~1.40.0
- [@types/npmlog](https://npm.io/package/@types/npmlog.md) ^4.1.2
- [@aws-cdk/aws-s3](https://npm.io/package/@aws-cdk/aws-s3.md) ~1.40.0
- [@aws-cdk/aws-iam](https://npm.io/package/@aws-cdk/aws-iam.md) ~1.40.0
- [@aws-cdk/aws-iot](https://npm.io/package/@aws-cdk/aws-iot.md) ~1.40.0
- [@aws-cdk/aws-kms](https://npm.io/package/@aws-cdk/aws-kms.md) ~1.40.0
- [@aws-cdk/aws-sns](https://npm.io/package/@aws-cdk/aws-sns.md) ~1.40.0
- [@aws-cdk/aws-sqs](https://npm.io/package/@aws-cdk/aws-sqs.md) ~1.40.0
- [@types/deep-diff](https://npm.io/package/@types/deep-diff.md) ^1.0.0
- [@aws-cdk/aws-logs](https://npm.io/package/@aws-cdk/aws-logs.md) ~1.40.0
- [@aws-cdk/aws-events](https://npm.io/package/@aws-cdk/aws-events.md) ~1.40.0
- [@aws-cdk/aws-lambda](https://npm.io/package/@aws-cdk/aws-lambda.md) ~1.40.0
- [@aws-cdk/aws-cognito](https://npm.io/package/@aws-cdk/aws-cognito.md) ~1.40.0
- [@aws-cdk/aws-kinesis](https://npm.io/package/@aws-cdk/aws-kinesis.md) ~1.40.0
- [@aws-cdk/aws-dynamodb](https://npm.io/package/@aws-cdk/aws-dynamodb.md) ~1.40.0
- [@aws-cdk/aws-apigateway](https://npm.io/package/@aws-cdk/aws-apigateway.md) ~1.40.0
- [@aws-cdk/aws-cloudfront](https://npm.io/package/@aws-cdk/aws-cloudfront.md) ~1.40.0
- [@aws-cdk/aws-cloudwatch](https://npm.io/package/@aws-cdk/aws-cloudwatch.md) ~1.40.0
- [@aws-cdk/aws-elasticsearch](https://npm.io/package/@aws-cdk/aws-elasticsearch.md) ~1.40.0
- [@aws-cdk/aws-kinesisfirehose](https://npm.io/package/@aws-cdk/aws-kinesisfirehose.md) ~1.40.0
- [@aws-cdk/aws-kinesisanalytics](https://npm.io/package/@aws-cdk/aws-kinesisanalytics.md) ~1.40.0
- [@aws-cdk/aws-lambda-event-sources](https://npm.io/package/@aws-cdk/aws-lambda-event-sources.md) ~1.40.0

## Recent versions

- 0.8.1 (latest) — 2020-05-21
- 0.8.0 — 2020-03-26

## README

# core module
<!--BEGIN STABILITY BANNER-->

---

![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)

> **This is a _developer preview_ (public beta) module.**
>
> All classes are under active development and subject to non-backward compatible changes or removal in any
> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
> This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.

---
<!--END STABILITY BANNER-->

| **API Reference**:| <span style="font-weight: normal">http://docs.awssolutionsbuilder.com/aws-solutions-konstruk/latest/api/core/</span>|
|:-------------|:-------------|
<div style="height:8px"></div>

The core library includes the basic building blocks of the AWS Solutions Konstruk Library. It defines the core classes that are used in the rest of the AWS Solutions Konstruk Library.

## Default Properties for AWS CDK Constructs

Core library sets the default properties for the AWS CDK Constructs used by the AWS Solutions Konstruk Library constructs.

For example, the following is the snippet of default properties for S3 Bucket construct created by AWS Solutions Konstruk construct. By default, it will turn on the server-side encryption, bucket versioning, block all public access and setup the S3 access logging.

```
{
  encryption: s3.BucketEncryption.S3_MANAGED,
  versioned: true,
  blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL,
  removalPolicy: RemovalPolicy.RETAIN,
  serverAccessLogsBucket: loggingBucket
}
```

## Override the default properties

The default properties set by the Core library can be overriden by user provided properties. For example, the user can override the Amazon S3 Block Public Access property to meet specific requirements.

```
  const stack = new cdk.Stack();

  const props: CloudFrontToS3Props = {
    deployBucket: true,
    bucketProps: {
      blockPublicAccess: {
        blockPublicAcls: false,
        blockPublicPolicy: true,
        ignorePublicAcls: false,
        restrictPublicBuckets: true
      }
    }
  };

  new CloudFrontToS3(stack, 'test-cloudfront-s3', props);

  expect(stack).toHaveResource("AWS::S3::Bucket", {
    PublicAccessBlockConfiguration: {
      BlockPublicAcls: false,
      BlockPublicPolicy: true,
      IgnorePublicAcls: false,
      RestrictPublicBuckets: true
    },
  });
```

---
_Source: https://npm.io/package/@aws-solutions-konstruk/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
