Socket
Book a DemoInstallSign in
Socket

@cubesoft/nx-lambda-build

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cubesoft/nx-lambda-build

## Getting started

latest
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

nx-lambda-build

Getting started

Prerequisite

This module is based on Nx, you will need to set up an Nx workspace before you can use nx-cdk.

npx create-nx-workspace

Installation

npm i -D @cubesoft/nx-lambda-build

Creating a nx-lambda-build project

nx g @cubesoft/nx-lambda-build:nx-lambda-build <name> [--dry-run]

Build a lambda handler

Run the command below to build your lambda handler and generate a package.json file with all used packages.

nx build <project> [--configuration <configuration name>] # Provide a specific build configuration

Project options

"targets": {
    "build": {
        "executor": "@cubesoft/nx-lambda-build:build",
        "options": {
            "target": "node16",
            "architecture": "arm64",
            "platform": "linux",
            "installModules": true
        }
    }
}

target: esbuild build target architecture: esbuild target architecture platform: npm install platform installModules: whether node_modules should be installed and bundled with the handler zip package

Add a new lambda handler (currently not working)

Run the command below to add a new lambda handler. This will automatically add the required entrypoint in the handlers.json file for you.

nx g @cubesoft/nx-lambda-build:handler <path> [--dry-run]

FAQs

Package last updated on 16 Dec 2023

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