@jcoreio/toolchain-aws-lambda
v4.12.4
Published
AWS Lambda function build toolchain
Downloads
574
Keywords
Readme
@jcoreio/toolchain-aws-lambda
This project deploys an AWS Lambda Function from JS or TS source.
Features
- Supports
.env
file, you can put AWS credentials,AWS_SDK_LOAD_CONFIG=1
,AWS_REGION
etc in.env
if you like - Adds the
tc deploy
script, which deploys to AWS - Uses
pack-lambda
to stream the source to S3, supportingpnpm
- If you use
@jcoreio/toolchain-semantic-release
, will deploy in CI
Conventions
The project must contain scripts/cloudFormationTemplate.js
(or .ts
if you're using @jcoreio/toolchain-typescript
)
that exports the following:
StackName
(optional) - the name for the CloudFormation Stack (defaults to the Lambda FunctionName)Template
- the CloudFormation templateParameters
(optional) - the parameters for the templateCapabilities
- the capabilities to use when deploying the stackTags
(options) - the tags for the CloudFormation Stack
The Template
must contain one AWS::Lambda::Function
or AWS::Serverless::Function
. It will provide defaults
for the following properties, so they are optional:
Description
: defaults to thedescription
inpackage.json
CodeUri
: defaults theBucket
to the AWS Account, and theKey
to something based upon thename
inpackage.json
Handler
: defaults to thehandler
export in themain
file inpackage.json
Runtime
: defaults tonodejs20.x
FunctionName
: defaults to something based upon thename
inpackage.json