Tool Kit plugin to manage Lambdas with AWS serverless.
This plugin will be installed as a dependency of the backend-serverless-app plugin, which we recommend using instead of installing this plugin directly. That plugin will install additional plugins that will be useful or most Customer Products projects at the FT.
With Tool Kit already set up, install this plugin as a dev dependency:
npm install --save-dev @dotcom-tool-kit/serverless
And add it to your repo's .toolkitrc.yml
:
plugins:
- '@dotcom-tool-kit/serverless'
Run serverless functions locally
Property | Description | Type | Default |
---|---|---|---|
ports |
ports to try to bind to for this application | Array<number> |
[3001,3002,3003] |
useDoppler |
run the application with environment variables from Doppler | boolean |
true |
All properties are optional.
Deploy a serverless function
Provision a review serverless function
Tear down existing serverless functions
Property | Description | Type | Default |
---|---|---|---|
awsAccountId (*) |
the ID of the AWS account you wish to deploy to (account IDs can be found at the FT login page) | string |
|
systemCode (*) |
the system code for your app | string |
|
regions |
an array of AWS regions you want to deploy to | Array<string> |
["eu-west-1"] |
configPath |
path to your serverless config file. If this is not provided, Serverless defaults to ./serverless.yml but other config fomats are accepted
|
string |
(*) Required.