|Plugin name:||serverless-stack-plugin implemented by ServerlessStackPlugin.ts|
|Plugin config file:||(none)|
This is a Heft plugin for building apps using the Serverless Stack (SST) framework. With this approach, the SST toolchain is only used for synthesizing CloudFormation stacks and deploying the app, and Heft takes over the role of compiling, linting, testing your TypeScript project.
When to use it
If your lambda service was built using the Serverless Stack framework.
How it works
The plugin has no effect without the
--sst parameter. When the parameter is provided:
heft build --sstwill behave similar to
sst build, which synthesizes CloudFormation stacks in the
build/cdk.out/directory. See this documentation for details. Heft's
build-watchmode is also supported.
heft build --sstcurrently requires AWS credentials, which limits the ability to perform this validation in a monorepo environment where we can't assume that every developer works on AWS. Issue serverless-stack#1537 is tracking a possible improvement.
The heft-serverless-stack-tutorial sample folder illustrates a complete project setup.
heft-serverless-stack-plugin/heft-plugin.json defines these parameters:
Invokes the SST postprocessing. Requires AWS credentials.
Specifies the Serverless Stack stage; equivalent to
to the "--stage" parameter from the "sst" CLI