Package detail

@aws-solutions-constructs/core

awslabs230.2kApache-2.02.85.6

Core CDK Construct for patterns library

readme

core module


Stability: Experimental

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 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.


Reference Documentation: https://docs.aws.amazon.com/solutions/latest/constructs/

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

NOTE: Functions in the core library are not part of the published interface for Solutions Constructs. While they are not hidden, using them directly can result in breaking changes outside the scope of a Major release. As many users have expressed an interest in accessing this functionality, we are in the process of exposing this functionality through factories that will produce individual well architected resources. Find the current state of this effort under aws-constructs-factories.

Default Properties for AWS CDK Constructs

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

For example, the following is the snippet of default properties for S3 Bucket construct created by AWS Solutions Constructs. 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 overridden 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 = {
    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
    },
  });

Property override warnings

When a default property from the Core library is overridden by a user-provided property, Constructs will emit one or more warning messages to the console highlighting the change(s). These messages are intended to provide situational awareness to the user and prevent unintentional overrides that could create security risks. These messages will appear whenever deployment/build-related commands are executed, including cdk deploy, cdk synth, npm test, etc.

Example message: AWS_CONSTRUCTS_WARNING: An override has been provided for the property: BillingMode. Default value: 'PAY_PER_REQUEST'. You provided: 'PROVISIONED'.

Toggling override warnings

Override warning messages are enabled by default, but can be explicitly turned on/off using the overrideWarningsEnabled shell variable.

  • To explicitly turn off override warnings, run export overrideWarningsEnabled=false.
  • To explicitly turn on override warnings, run export overrideWarningsEnabled=true.
  • To revert to the default, run unset overrideWarningsEnabled.

changelog

deep-diff Change Log

deep-diff is a javascript/node.js module providing utility functions for determining the structural differences between objects and includes some utilities for applying differences across objects.

Log

1.0.2 - 2018-08-10

  • Support for react-native environment - Thanks @xanderberkein

1.0.0 - 2018-04-18

0.3.8 - 2017-05-03

  • reconciled recently introduced difference between index.es.js and index.js
  • improved npm commands for more reliable contributions
  • added a few notes to README regarding contributing.

0.3.7 - 2017-05-01

  • fixed issue #98 by merging @sberan's pull request #99 — better handling of property with undefined value existing on either operand. Unit tests supplied.

0.3.6 - 2017-04-25 — Fixed, closed lingering issues:

  • fixed #74 — comparing objects with longer cycles
  • fixed #70 — was not properly detecting a deletion when a property on the operand (lhs) had a value of undefined and was undefined on the comparand (rhs). :o).
  • WARNING! Still broken when importing in Typescript.

0.3.5 - 2017-04-23 — Rolled up recent fixes; patches:

0.3.4 - Typescript users, reference this version until #97 is fixed!

0.3.3 - Thanks @SimenB: enabled npm script for release (alternate to the Makefile). Also linting as part of npm test. Thanks @joeldenning: Fixed issue #35; diffs of top level arrays now working.

0.3.3 - Thanks @SimenB: enabled npm script for release (alternate to the Makefile). Also linting as part of npm test. Thanks @joeldenning: Fixed issue #35; diffs of top level arrays now working.

0.3.2 - Resolves #46; support more robust filters by including lhs and rhs in the filter callback. By @Orlando80

0.3.1 - Better type checking by @Drinks, UMD wrapper by @SimenB. Now certifies against nodejs 12 and iojs (Thanks @SimenB).

0.2.0 - Fixes Bug #17, Fixes Bug #19, Enhancement #21 Applying changes that are properly structured can now be applied as a change (no longer requires typeof Diff) - supports differences being applied after round-trip serialization to JSON format. Prefilter now reports the path of all changes - it was not showing a path for arrays and anything in the structure below (reported by @ravishvt).

Breaking Change – The structure of change records for differences below an array element has changed. Array indexes are now reported as numeric elements in the path if the changes is merely edited (an E kind). Changes of kind A (array) are only reported for changes in the terminal array itself and will have a nested N (new) item or a nested D (deleted) item.

0.1.7 - Enhancement #11 Added the ability to filter properties that should not be analyzed while calculating differences. Makes deep-diff more usable with frameworks that attach housekeeping properties to existing objects. AngularJS does this, and the new filter ability should ease working with it.

0.1.6 - Changed objects within nested arrays can now be applied. They were previously recording the changes appropriately but applyDiff would error. Comparison of NaN works more sanely - comparison to number shows difference, comparison to another Nan does not.