0.1.8 • Published 5 years ago

checked-aws-custom-resource v0.1.8

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

Checked AWS Custom Resource

This is a wrapper around the AWS CDK's AwsCustomResource.

By default, if you specify an SDK function for AwsCustomResource which doens't exist, CDK will still generate a CloudFormation template for you and attempt to deploy it, just to eventually fail.

This wrapper resolves that by complaining when you give it SDK services or actions which don't exist. The price is fairly small: your CDK project will depend on aws-sdk.

Installation

npm install --save checked-aws-custom-resource

Usage

This class is used identically to AwsCustomResource. For example:

import { CheckedAwsCustomResource } from "checked-aws-custom-resource";

new CheckedAwsCustomResource(stack, "Resource", {
  onCreate: {
    service: "RDS",
    action: "modifyDBCluster",
    parameters: {
      DBClusterIdentifier: db.ref,
      EnableHttpEndpoint: true
    },
    physicalResourceId: `resourceId`
  }
});

However, if the service or action is does not exist, e.g the action could be miscapitalized as "ModifyDBCluster", the class will throw an exception during instantiation. For example:

$ cdk synth MyStack
ModifyDBCluster is not a function in AWS.RDS
0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago