Helper functions which simplify working with AWS CloudFormation stacks.
npm i --save-dev --save-exact @bifravst/cloudformation-helpers
cfnResponse
implements sending custom resource responses.
import { cfnResponse, ResponseStatus } from "@bifravst/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",
});
};