@cdk-util/aws-lambda

0.3.0 • Public • Published

@cdk-util/aws-lambda

Installation

npm i @cdk-util/aws-lambda

Usage

import { NodejsFunction } from "@cdk-util/aws-lambda";

/**
 * Defines a Lambda Function and a Lambda Layer for NodeJS.
 * 
 * This construct requires package.json in a specified directory
 * to generate the Function and the Layer.
 * 
 * The directory pointed by the `main` property of the package.json
 * is used for the code asset of the Function.
 * 
 * The `dependencies` property is used to generate the Layer with CodeBuild.
 */
const handler = new NodejsFunction(this, "handler", {
  packageDirectory: 'path/to/dir',
});

License

MIT

Dependencies (0)

    Dev Dependencies (8)

    Package Sidebar

    Install

    npm i @cdk-util/aws-lambda

    Weekly Downloads

    0

    Version

    0.3.0

    License

    MIT

    Unpacked Size

    20.9 kB

    Total Files

    10

    Last publish

    Collaborators

    • nak2k