Registry / aws / java2faas

java2faas

JSON →
library0.3.2jsnpmunverified

CLI tool that transpiles Java code for deployment to AWS Lambda and IBM Cloud Functions. Version 0.3.2. It converts a local Java project into deployable artifacts (with Maven support) for two cloud providers simultaneously. Differentiated by handling both Amazon and IBM from a single source, automatically generating deployment scripts. Suitable for simple Java functions on Java 8. No active development since 2019.

npm install java2faas
INSTALL
IMPORT
SIG · JAVA2FAAS
J
java2faas
awsjavascriptv0.3.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

java2faas
import { java2faas } from 'java2faas'
const java2faas = require('java2faas')
ESM module; use import syntax. No default export.
CLI
import { CLI } from 'java2faas/cli'
import CLI from 'java2faas'
CLI functionality is in subpath export; use full path.
Transpiler
import { Transpiler } from 'java2faas'
import { transPiler } from 'java2faas'
Case-sensitive: 'Transpiler' with capital T.

Install globally and run from terminal to transpile a Java project into deployable artifacts for AWS Lambda and IBM Cloud Functions.

npm i -g java2faas@0.3.2 java2faas --path . --name myFunction --entry-file src/main/java/Hello.java --entry-method hello --aws-role arn:aws:iam::123456789012:role/lambda-role
java2faas --version
Debug
Known issues
gotchaPackage not updated since 2019 and has low downloads; consider alternatives like CDK or Terraform for production deployments.
fix
Use AWS CDK or Terraform with Java runtime.
affects: >=0.0.0
gotchaOnly supports Java 8; Java 11+ features may break.
fix
Ensure your code targets Java 8 bytecode.
affects: >=0.0.0
gotchaRequires Request.java and Response.java to have getters/setters; otherwise compilation fails.
fix
Include proper JavaBean patterns (getters, setters, no-arg constructor).
affects: >=0.0.0
gotchaCLI options are case-sensitive and not validated; typo in --aws-role will cause silent failure.
fix
Double-check option spelling: --aws-role (not --awsRole).
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'java2faas'
Package not installed or not in PATH
fix
Run 'npm i -g java2faas' or use npx: 'npx java2faas ...'
sh: deploy.sh: No such file or directory
java2faas did not generate the amazon/ibm directories
fix
Verify options: --path must point to project root with src/main/java structure.
Class not found: Request/Response
Request.java or Response.java missing correct getters/setters or no-arg constructor
fix
Ensure both classes have getter for each field, setter for each field, and a public no-argument constructor.
Upgrade
Version history
0.3.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources