Skip to main content
Module

x/lambda/artifacts

A deno runtime for AWS Lambda. Deploy deno via docker, SAM, serverless, or bundle it yourself.
Very Popular
Go to Latest
File
#!/bin/shset -euo pipefail
# populate the cache from deno.land/x/lambda so we use the current filesmkdir -p .deno_dir/deps/https/deno.land/x/lambda/cp mod.ts .deno_dir/deps/https/deno.land/x/lambda/mod.ts# this shouldn't require a fetch to deno.landDENO_DIR=.deno_dir ./amz-deno fetch hello.ts
# assert the required files are going to be present in the zipls amz-deno &> /dev/null && ls bootstrap &> /dev/null && ls hello.ts &> /dev/null
cp -R .deno_dir/gen/file/$PWD/ .deno_dir/LAMBDA_TASK_ROOTzip -qq deno-lambda-layer.zip -x '.deno_dir/gen/file/*' -r .deno_dir amz-deno bootstrap hello.tszip -qq deno-lambda-example.zip -x '.deno_dir/gen/file/*' -r .deno_dir hello.ts
DENO_DIR=.deno_dir ./amz-deno bundle bundle.ts bundle.bundle.js