Serverless build uses the sls deploy
and sls deploy function
CLI commands, overriding the standard build
functionality.
- Configure serverless build
- Configure serverless with AWS credentials
sls deploy
to deploy your resources and all functions at oncesls invoke -l -f <fnName>
to invoke a deployed functionsls deploy function -f <fnName>
to deploy a single functionNODE_ENV=production sls deploy function -f <fnName>
when your build process cares aboutprocess.env.NODE_ENV
If you'd like to test out a preconfigured project...
git clone [email protected]:nfour/serverless-build-plugin
cd serverless-build-plugin
yarn
yarn build
yarn link
cd test/1.0
yarn
yarn link serverless-build-plugin
sls deploy
sls invoke -f one -l
sls deploy function -f two
sls invoke -f two -l
If you want to audit the built zip, run:
sls package
Then check the .serverless/artifacts
directory