NordicSemiconductor / cloud-aws-cloudformation-helpers-js

Helper functions which simplify working with AWS CloudFormation stacks

Home Page:https://github.com/NordicSemiconductor/cloud-aws-cloudformation-helpers-js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CloudFormation Helpers npm version

GitHub Actions semantic-release Renovate @commitlint/config-conventional code style: prettier ESLint: TypeScript

Helper functions which simplify working with AWS CloudFormation stacks.

Installation

npm i --save-dev --save-exact @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",
  });
};

About

Helper functions which simplify working with AWS CloudFormation stacks

https://github.com/NordicSemiconductor/cloud-aws-cloudformation-helpers-js

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:TypeScript 98.1%Language:JavaScript 1.9%