Configuration

Standard Serverless Framework rules apply but, we have some added prerequisites, recommendations, and caveats.

Prerequisites

We strongly recommend you commit the package-lock.json that is generated after running npm install.

Options

Options specific to Serverless Framework modules.

args: Optional[List[str]] = []

List of CLI arguments/options to pass to the Serverless Framework CLI. See Specifying Serverless CLI Arguments/Options for more details.

Example

options:
  args:
    - '--config'
    - sls.yml

New in version 1.4.0.

extend_serverless_yml: Optional[Dict[str, Any]] = {}

If provided, the value of this option will be recursively merged into the modules serverless.yml file. See Extending a Serverless Configuration File for more details.

Example

options:
  extend_serverless_yml:
    custom:
      env:
        memorySize: 512

New in version 1.8.0.

promotezip: Optional[Dict[str, str]] = {}

If provided, promote Serverless Framework generated zip files between environments from a build AWS account. See Promoting Builds Through Environments for more details.

Example

options:
  promotezip:
    bucketname: my-build-account-bucket-name
skip_npm_ci: bool = False

Skip running npm ci in the module directory prior to processing the module. See Disabling NPM CI for more details.

Example

options:
  skip_npm_ci: true

serverless.yml

Refer to the Serverless Framework Documentation.

Stages

Runway’s concept of a deploy environment has a 1-to-1 mapping to Serverless’s stage. For example, if the deploy environment is dev, Serverless will be run with --stage dev.

Each stage requires either its own variables file (even if empty for a particular stage) following a specific File Naming scheme and/or a configured environment for the module or deployment (see Runway Config File for details).

File Naming

  • env/STAGE-REGION.yml

  • config-STAGE-REGION.yml

  • env/STAGE.yml

  • config-STAGE.yml

  • env/STAGE-REGION.json

  • config-STAGE-REGION.json

  • env/STAGE.json

  • config-STAGE.json