New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cdk-lambda-code

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdk-lambda-code

Wrapper arroud @aws-cdk/aws-lambda Code to support mocking in test mode and configuration wtih package.json namespaces

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

cdk-lambda-code

Build Status

Wrapper arroud @aws-cdk/aws-lambda Code to support mocking in test mode and configuration wtih package.json namespaces

:warning: This is experimental and subject to breaking changes.

Install

// with npm
npm install cdk-lambda-code

// with yarn
yarn add cdk-lambda-code

How to use fromPackageJson

// package.json

{
  "name": "construct",
  "lambdaDependencies": {
    "lambdaHandler": {
      "runtime": "nodejs10.x",
      "handler": "lib/index.handler",
      "artifact": "lambda/bundle.zip"
    }
  }
}
// smaple-construct.ts
import { LambdaCode } from 'cdk-lambda-code';

new Function(this, 'LambdaFunction', {
  ...LambdaCode.fromPackageJson('lambdaHandler', {
    cwd: __dirname,
    mockInTestMode: true
  })
});

How to use fromFileAsInline

// smaple-construct.ts
import { LambdaCode } from 'cdk-lambda-code';

new Function(this, 'LambdaFunction', {
  code: LambdaCode.fromFileAsInline(path.join(__dirname, '..', 'handler.js'))
  runtime: Runtime.NODEJS_10_X,
  handler: 'index.handler'
});

License

MIT

Keywords

aws cdk

FAQs

Package last updated on 19 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts