npx lambda-build archive bundles your code and creates a local archive.zip file that you can then upload to aws yourself.
npx lambda-build upload bundles your code and then uploads it directly to your AWS lambda functions (requires the aws cli to be locally configured).
import { build } from 'lambda-build'; const res = await build({ entry: 'src/index.js', external: ['lodash', 'dayjs'], metafile: true, });
import { buildAndUpload } from 'lambda-build'; const res = await buildAndUpload({ entry: 'src/index.js', external: ['lodash', 'dayjs'], metafile: true, lambdas: ['my-lambda1', 'my-lambda2'], region: 'us-east-2', });