Lambda

Lambda specifies an a serverless nano service entity. A directory src next to Berliozfile would be packaged as a part of push command

mysvc/
    src/
    Berliozfile

Definition

kind: lambda
name: <lambda-name>
cluster: <lambda-name>

runtime: <execution-runtime>
handler: <entry-point>
timeout: <timeout>

consumes:
    - database: <other-database-name>
    - queue: <other-queue-name>

environment:
    <variable-name>: <variable-value>

resources:
    memory:
        min: <memory-in-megabytes>
Property Description
name Lambda name. Contain alpha-numeric characters. No symbols. Keep under 6 characters.
cluster Cluster name.

Lambda Parameters

Property Description
runtime Runtime environment. One of: nodejs6, nodejs8, python3, go
handler Name of the function to be called
timeout Execution timeout in seconds

Consumes

consumes attribute defines which endpoints of other services are used by the current service. This definition would control how firewall security rules are defined, and also enable automatic service discovery entries. Possible consumables include:

Consumed Description
database Name of database to consume.
queue Name of queue to consume.

Environment

Specifies environment variables applied to current lambda. Can use ${OTHER_VAR_NAME} to refer to other environment variables within the value.

Resources

Consumed resources of the service are specified under resources attribute.