From 35a14a9896bf667a7ba8230b4e7e555a0ddc41cd Mon Sep 17 00:00:00 2001 From: Philipp Muens Date: Mon, 6 Mar 2017 15:25:34 +0100 Subject: [PATCH] Add section about memorySize and timeout config for functions --- docs/providers/google/guide/functions.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/providers/google/guide/functions.md b/docs/providers/google/guide/functions.md index a4675ba2e..a6d77c3aa 100644 --- a/docs/providers/google/guide/functions.md +++ b/docs/providers/google/guide/functions.md @@ -59,6 +59,28 @@ functions: handler: otherHandler ``` +## Memory size and timeout + +The `memorySize` and `timeout` for the functions can be specified on the provider or function level. The provider wide definition causes all functions to share this config, whereas the function wide definition means that this configuration is only valid for the function. + +The default `memorySize` is 256 and the default timeout is `60s` if not specified. + +```yml +# serverless.yml + +provider: + memorySize: 1024 + timeout: 90s + +functions: + first: + handler: first + second: + handler: second + memorySize: 512 + timeout: 120s +``` + ## Handler signatures Google Cloud Functions have different handler signatures dependent on the event type which will trigger them.