@nordicsemiconductor/cloudformation-helpers

Helper functions which simplify working with AWS CloudFormation stacks

Usage no npm install needed!

<script type="module">
  import nordicsemiconductorCloudformationHelpers from 'https://cdn.skypack.dev/@nordicsemiconductor/cloudformation-helpers';
</script>

README

CloudFormation Helpers npm version

GitHub Actions semantic-release Renovate Mergify Status Commitizen friendly code style: prettier ESLint: TypeScript

Helper functions which simplify working with AWS CloudFormation stacks.

Installation

npm i --save-dev @nordicsemiconductor/cloudformation-helpers

Usage

cfnResponse

cfnResponse implements sending custom resource responses.

import {
  cfnResponse,
  ResponseStatus,
} from "@nordicsemiconductor/cloudformation-helpers";
import { CloudFormationCustomResourceEvent } from "aws-lambda";

/**
 * Lambda creating a custom resource
 */
export const handler = async (
  event: CloudFormationCustomResourceEvent
): Promise<void> => {
  // Create custom resource ...

  await cfnResponse({
    Status: ResponseStatus.SUCCESS,
    event,
    PhysicalResourceId: "MyCustomResource",
  });
};