Skip to content

Latest commit

 

History

History
69 lines (54 loc) · 1.51 KB

File metadata and controls

69 lines (54 loc) · 1.51 KB

Print

Print your serverless.yml config file with all variables resolved.

If you're using Serverless Variables in your serverless.yml, it can be difficult to know if your syntax is correct or if the variables are resolving as you expect.

With this command, it will print the fully-resolved config to your console.

serverless print

Options

  • None

Examples:

Assuming you have the following config file:

service: new-service
provider: azure
custom:
  globalSchedule: cron(0 * * * *)

functions:
  hello:
    handler: handler.hello
    events:
      - timer: ${self:custom.globalSchedule}
  world:
    handler: handler.world
    events:
      - timer: ${self:custom.globalSchedule}

Using sls print will resolve the variables in the timer blocks.

service: new-service
provider: azure
custom:
  globalSchedule: cron(0 * * * *)

functions:
  hello:
    handler: handler.hello
    events:
      - timer: cron(0 * * * *) # <-- Resolved
  world:
    handler: handler.world
    events:
      - timer: cron(0 * * * *) # <-- Resolved