@nona-creative/aws-cdk-lambda
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

AWS Lambda (CDK)

Installation

npm i -S @nona-creative/aws-cdk-lambda

Usage

  1. Configure the build Lambda function

    const _buildLambdaFunction = buildLambdaFunction(
      Code.fromAsset(codeAssetsZipFile),
      `${this.id}-handlers`,
      `${this.id}-lambda-${this.stage}`,
    )

    optionally with VPC:

    const functionProps = {
      vpc: this.vpcStack.vpc,
      securityGroup: this.vpcStack.securityGroups[LAMBDA_VPC_SECURITY_GROUP_NAME],
      vpcSubnets: { subnetType: SubnetType.PRIVATE },
    }
    const _buildLambdaFunction = buildLambdaFunction(
      Code.fromAsset(codeAssetsZipFile),
      `${this.id}-handlers`,
      `${this.id}-lambda-${this.stage}`,
      functionProps,
    )
  2. Build functions as needed, eg.

    const getBooksLambda = _buildLambdaFunction(stack, 'getBooks', environment)
    const createBookLambda = _buildLambdaFunction(stack, 'createBook', environment)

Readme

Keywords

Package Sidebar

Install

npm i @nona-creative/aws-cdk-lambda

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

24.8 kB

Total Files

21

Last publish

Collaborators

  • ian-cawood
  • yesitsdave
  • syntaxza
  • rollyourowned
  • neilrussell6