@types/cfn-response
v1.0.9
Published
TypeScript definitions for cfn-response
Downloads
38,910
Readme
Installation
npm install --save @types/cfn-response
Summary
This package contains type definitions for cfn-response (https://github.com/LukeMizuhashi/cfn-response).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cfn-response.
index.d.ts
import { CloudFormationCustomResourceEvent, Context } from "aws-lambda";
/**
* Response status indicating the custom resource operation succeeded.
*/
export const SUCCESS: "SUCCESS";
/**
* Response status indicating the custom resource operation failed.
* CloudFormation will roll back the stack if FAILED is returned during create or update.
*/
export const FAILED: "FAILED";
/**
* Union type of the two possible response statuses for a CloudFormation custom resource.
*/
export type ResponseStatus = typeof SUCCESS | typeof FAILED;
/**
* Sends a response to the CloudFormation pre-signed S3 URL to signal the result
* of a custom resource operation. Must be called in every code path of a Lambda-backed
* custom resource — if not called, the CloudFormation stack will hang until it times out.
*
* Note: this function does not return a Promise. Lambda completion is signaled via
* `context.done()` internally. Do not use `await` with this function.
*
* @param event - The CloudFormation custom resource event containing the ResponseURL,
* StackId, RequestId, and LogicalResourceId.
* @param context - The Lambda context object, used for the log stream name and signaling completion.
* @param responseStatus - Whether the operation succeeded or failed. Use `SUCCESS` or `FAILED`.
* @param responseData - Optional key-value data to return to CloudFormation,
* accessible via `Fn::GetAtt` in the template.
* @param physicalResourceId - The unique identifier of the custom resource.
* Defaults to the Lambda log stream name if not provided.
* WARNING: changing this value on an update will cause CloudFormation to delete the old resource.
*/
export function send(
event: CloudFormationCustomResourceEvent,
context: Context,
responseStatus: ResponseStatus,
responseData?: Record<string, unknown>,
physicalResourceId?: string,
): void;
Additional Details
- Last updated: Mon, 09 Mar 2026 21:43:19 GMT
- Dependencies: @types/aws-lambda
Credits
These definitions were written by arturovt.
