diff --git a/lambda-optimizations/README.md b/lambda-optimizations/README.md
new file mode 100644
index 0000000..cc767ab
--- /dev/null
+++ b/lambda-optimizations/README.md
@@ -0,0 +1,60 @@
+
AWS Lambda Performance Optimizations
+
+ Among the biggest issues we – a 100% serverless company – have faced, are AWS Lambda cold starts,
+ the extra time it takes for a function to execute when it hasn’t recently been invoked.
+
+
+ "Keep Lambda warm" - one of the most important topics in optimizations of Lambdas
+
+
+
+ Cold starts can be a killer to Lambda performance, especially if you’re developing a customer-facing application that needs to operate in real time.
+ They happen because if your Lambda is not already running, AWS needs to deploy your code and spin up a new container before the request can begin.
+ This can mean a request takes much longer to execute, and only when the container is ready can your lambda start running.
+
+
+
+
+
+ The serverless cold start is the first time your code is being executed by your cloud provider, and requires it to be downloaded,
+ containerised, booted, and primed to be run. This can add significant overhead — up to 1.5s of latency.
+ But good news: these cold starts are expected to be outliers, only affecting 5% of executions.
+ So, while they don’t happen all the time, they are important to think about when designing your application.
+
+ Get Lambdas out of VPC
+
+ Unless it’s really necessary (for instance, to access resources within a VPC) try to get your Lambdas running outside of your VPC,
+ as the attachment of the ENI interfaces can have a huge impact on Lambda cold start times.
+ In these experiments run by Alessandro Morandi, he found that a Lambda with 3GB of memory took up to 30x longer to invoke from a cold start
+ when inside a VPC compared to outside a VPC.
+
+ The added complexity of having a Lambda function live inside a VPC introduces new latencies.
+ These latencies are due to creating an Elastic Network Interface and then waiting for Lambda to assign itself that IP.
+ Also be careful, each Lambda function requires an IP address and you don’t want to run out!
+
+
+
+
+Ways to improve AWS Lambda cold start performance
+
+ While AWS Lambda cold start times are a real issue, the good news is that there are very useful tools and approaches
+ that can help to mitigate the problem, either by avoiding cold starts altogether or reducing their duration.
+ Keep lambdas warm
+ Tools invokes the lambdas at a given interval to ensure that the containers aren’t destroyed:
+
+ Reduce the number of packages
+ We’ve seen that the biggest impact on AWS Lambda cold start times is not the size of the package but the initialization time when the package is actually loaded for the first time.
+ Tools which can help you reduce the number of packages
+
+ Get Lambdas out of VPC
+ You should really only be putting your Lambda functions inside a VPC when you absolutely need access to resources that can’t be exposed to the outside world.
+ Otherwise, you are going to be paying for it in start up times and it matters.
+ As Yan Cui highlighted in his article ‘You’re thinking about cold starts wrong’, cold starts can happen at anytime, and especially during peak service usage.
+
+
diff --git a/lambda-optimizations/examples/lambda-warmer/.npmignore b/lambda-optimizations/examples/lambda-warmer/.npmignore
new file mode 100644
index 0000000..2b48c8b
--- /dev/null
+++ b/lambda-optimizations/examples/lambda-warmer/.npmignore
@@ -0,0 +1,6 @@
+# package directories
+node_modules
+jspm_packages
+
+# Serverless directories
+.serverless
\ No newline at end of file
diff --git a/lambda-optimizations/examples/lambda-warmer/handler.js b/lambda-optimizations/examples/lambda-warmer/handler.js
new file mode 100644
index 0000000..8101a55
--- /dev/null
+++ b/lambda-optimizations/examples/lambda-warmer/handler.js
@@ -0,0 +1,18 @@
+const warmer = require('lambda-warmer');
+
+module.exports.hello = async (event) => {
+ if (await warmer( event ))
+ return 'warmed';
+
+ return {
+ statusCode: 200,
+ body: JSON.stringify(
+ {
+ message: 'Go Serverless v1.0! Your function executed successfully!',
+ input: event,
+ },
+ null,
+ 2
+ ),
+ };
+};
diff --git a/lambda-optimizations/examples/lambda-warmer/package-lock.json b/lambda-optimizations/examples/lambda-warmer/package-lock.json
new file mode 100644
index 0000000..f25cc57
--- /dev/null
+++ b/lambda-optimizations/examples/lambda-warmer/package-lock.json
@@ -0,0 +1,13 @@
+{
+ "name": "lambda-warmer-example",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "lambda-warmer": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/lambda-warmer/-/lambda-warmer-1.2.1.tgz",
+ "integrity": "sha512-JSTkORIwLjvgDrrrOsh9Tk7eTmpOzbH5F2nCJMIHtdjK7tCwS1wwvIFwXYLM3vOLTQCOuIaegfKuC9YLyGszNA=="
+ }
+ }
+}
diff --git a/lambda-optimizations/examples/lambda-warmer/package.json b/lambda-optimizations/examples/lambda-warmer/package.json
new file mode 100644
index 0000000..5d16d4c
--- /dev/null
+++ b/lambda-optimizations/examples/lambda-warmer/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "lambda-warmer-example",
+ "version": "1.0.0",
+ "description": "",
+ "main": "handler.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "",
+ "license": "ISC",
+ "dependencies": {
+ "lambda-warmer": "^1.2.1"
+ }
+}
diff --git a/lambda-optimizations/examples/lambda-warmer/serverless.yml b/lambda-optimizations/examples/lambda-warmer/serverless.yml
new file mode 100644
index 0000000..35a8c37
--- /dev/null
+++ b/lambda-optimizations/examples/lambda-warmer/serverless.yml
@@ -0,0 +1,28 @@
+service: lambda-warmer
+frameworkVersion: '2'
+
+provider:
+ name: aws
+ runtime: nodejs12.x
+ lambdaHashingVersion: 20201221
+
+ iamRoleStatements:
+ - Effect: "Allow"
+ Action:
+ - "lambda:InvokeFunction"
+ Resource: "arn:aws:lambda:us-east-1:*"
+
+functions:
+ hello:
+ handler: handler.hello
+ events:
+ - httpApi:
+ path: /hello
+ method: get
+ - schedule:
+ name: warmer-schedule-name
+ rate: rate(5 minutes)
+ enabled: true
+ input:
+ warmer: true
+ concurrency: 1
diff --git a/lambda-optimizations/examples/serverless-warmup-plugin/.npmignore b/lambda-optimizations/examples/serverless-warmup-plugin/.npmignore
new file mode 100644
index 0000000..2b48c8b
--- /dev/null
+++ b/lambda-optimizations/examples/serverless-warmup-plugin/.npmignore
@@ -0,0 +1,6 @@
+# package directories
+node_modules
+jspm_packages
+
+# Serverless directories
+.serverless
\ No newline at end of file
diff --git a/lambda-optimizations/examples/serverless-warmup-plugin/.warmup/index.js b/lambda-optimizations/examples/serverless-warmup-plugin/.warmup/index.js
new file mode 100644
index 0000000..852b816
--- /dev/null
+++ b/lambda-optimizations/examples/serverless-warmup-plugin/.warmup/index.js
@@ -0,0 +1,77 @@
+'use strict';
+
+/** Generated by Serverless WarmUp Plugin at 2021-03-22T10:32:04.308Z */
+
+const AWSXRay = require('aws-xray-sdk-core');
+const AWS = AWSXRay.captureAWS(require('aws-sdk'));;
+const lambda = new AWS.Lambda({
+ apiVersion: '2015-03-31',
+ region: 'us-east-1',
+ httpOptions: {
+ connectTimeout: 1000, // 1 second
+ },
+});
+const functions = [
+ {
+ "name": "warmup-plugin-dev-hello",
+ "config": {
+ "enabled": "dev",
+ "payload": "{\"source\":\"serverless-plugin-warmup\"}",
+ "concurrency": 1
+ }
+ }
+];
+
+function getConcurrency(func, envVars) {
+ const functionConcurrency = envVars[`WARMUP_CONCURRENCY_${func.name.toUpperCase().replace(/-/g, '_')}`];
+
+ if (functionConcurrency) {
+ const concurrency = parseInt(functionConcurrency);
+ console.log(`Warming up function: ${func.name} with concurrency: ${concurrency} (from function-specific environment variable)`);
+ return concurrency;
+ }
+
+ if (envVars.WARMUP_CONCURRENCY) {
+ const concurrency = parseInt(envVars.WARMUP_CONCURRENCY);
+ console.log(`Warming up function: ${func.name} with concurrency: ${concurrency} (from global environment variable)`);
+ return concurrency;
+ }
+
+ const concurrency = parseInt(func.config.concurrency);
+ console.log(`Warming up function: ${func.name} with concurrency: ${concurrency}`);
+ return concurrency;
+}
+
+module.exports.warmUp = async (event, context) => {
+ console.log('Warm Up Start');
+
+ const invokes = await Promise.all(functions.map(async (func) => {
+ const concurrency = getConcurrency(func, process.env);
+
+ const clientContext = func.config.clientContext !== undefined
+ ? func.config.clientContext
+ : func.config.payload;
+
+ const params = {
+ ClientContext: clientContext
+ ? Buffer.from(`{"custom":${clientContext}}`).toString('base64')
+ : undefined,
+ FunctionName: func.name,
+ InvocationType: 'RequestResponse',
+ LogType: 'None',
+ Qualifier: func.config.alias || process.env.SERVERLESS_ALIAS,
+ Payload: func.config.payload
+ };
+
+ try {
+ await Promise.all(Array(concurrency).fill(0).map(async () => await lambda.invoke(params).promise()));
+ console.log(`Warm Up Invoke Success: ${func.name}`);
+ return true;
+ } catch (e) {
+ console.log(`Warm Up Invoke Error: ${func.name}`, e);
+ return false;
+ }
+ }));
+
+ console.log(`Warm Up Finished with ${invokes.filter(r => !r).length} invoke errors`);
+}
\ No newline at end of file
diff --git a/lambda-optimizations/examples/serverless-warmup-plugin/.warmup/package-lock.json b/lambda-optimizations/examples/serverless-warmup-plugin/.warmup/package-lock.json
new file mode 100644
index 0000000..0c22e24
--- /dev/null
+++ b/lambda-optimizations/examples/serverless-warmup-plugin/.warmup/package-lock.json
@@ -0,0 +1,178 @@
+{
+ "name": "warmup-function",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "@types/cls-hooked": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@types/cls-hooked/-/cls-hooked-4.3.3.tgz",
+ "integrity": "sha512-gNstDTb/ty5h6gJd6YpSPgsLX9LmRpaKJqGFp7MRlYxhwp4vXXKlJ9+bt1TZ9KbVNXE+Mbxy2AYXcpY21DDtJw==",
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/node": {
+ "version": "14.14.35",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.35.tgz",
+ "integrity": "sha512-Lt+wj8NVPx0zUmUwumiVXapmaLUcAk3yPuHCFVXras9k5VT9TdhJqKqGVUQCD60OTMCl0qxJ57OiTL0Mic3Iag=="
+ },
+ "async-hook-jl": {
+ "version": "1.7.6",
+ "resolved": "https://registry.npmjs.org/async-hook-jl/-/async-hook-jl-1.7.6.tgz",
+ "integrity": "sha512-gFaHkFfSxTjvoxDMYqDuGHlcRyUuamF8s+ZTtJdDzqjws4mCt7v0vuV79/E2Wr2/riMQgtG4/yUtXWs1gZ7JMg==",
+ "requires": {
+ "stack-chain": "^1.3.7"
+ }
+ },
+ "atomic-batcher": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/atomic-batcher/-/atomic-batcher-1.0.2.tgz",
+ "integrity": "sha1-0WkB0QzOxZUWwZe5zNiTBom4E7Q="
+ },
+ "aws-sdk": {
+ "version": "2.868.0",
+ "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.868.0.tgz",
+ "integrity": "sha512-ZayPsA/ycaAXqqa2oDyf8iUpl1WOLODZS8ZdvYj77L5owMQm0XC7yqiD+WHj9nToUECF9VAD+AKQMIN6695tVQ==",
+ "requires": {
+ "buffer": "4.9.2",
+ "events": "1.1.1",
+ "ieee754": "1.1.13",
+ "jmespath": "0.15.0",
+ "querystring": "0.2.0",
+ "sax": "1.2.1",
+ "url": "0.10.3",
+ "uuid": "3.3.2",
+ "xml2js": "0.4.19"
+ }
+ },
+ "aws-xray-sdk-core": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/aws-xray-sdk-core/-/aws-xray-sdk-core-3.2.0.tgz",
+ "integrity": "sha512-6mhqmRsQbDAISyKQuYguO38AhHgGSZsmYLVUYWUV9eJ+GiHZf08apwM7fSdiRw56qCulgSTV5JG2/cnPmtBhUA==",
+ "requires": {
+ "@types/cls-hooked": "*",
+ "atomic-batcher": "^1.0.2",
+ "cls-hooked": "^4.2.2",
+ "pkginfo": "^0.4.0",
+ "semver": "^5.3.0"
+ }
+ },
+ "base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
+ },
+ "buffer": {
+ "version": "4.9.2",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz",
+ "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==",
+ "requires": {
+ "base64-js": "^1.0.2",
+ "ieee754": "^1.1.4",
+ "isarray": "^1.0.0"
+ }
+ },
+ "cls-hooked": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/cls-hooked/-/cls-hooked-4.2.2.tgz",
+ "integrity": "sha512-J4Xj5f5wq/4jAvcdgoGsL3G103BtWpZrMo8NEinRltN+xpTZdI+M38pyQqhuFU/P792xkMFvnKSf+Lm81U1bxw==",
+ "requires": {
+ "async-hook-jl": "^1.7.6",
+ "emitter-listener": "^1.0.1",
+ "semver": "^5.4.1"
+ }
+ },
+ "emitter-listener": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/emitter-listener/-/emitter-listener-1.1.2.tgz",
+ "integrity": "sha512-Bt1sBAGFHY9DKY+4/2cV6izcKJUf5T7/gkdmkxzX/qv9CcGH8xSwVRW5mtX03SWJtRTWSOpzCuWN9rBFYZepZQ==",
+ "requires": {
+ "shimmer": "^1.2.0"
+ }
+ },
+ "events": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
+ "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ="
+ },
+ "ieee754": {
+ "version": "1.1.13",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
+ "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
+ },
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+ },
+ "jmespath": {
+ "version": "0.15.0",
+ "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz",
+ "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc="
+ },
+ "pkginfo": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz",
+ "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8="
+ },
+ "punycode": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
+ "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0="
+ },
+ "querystring": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
+ "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA="
+ },
+ "sax": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
+ "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
+ },
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
+ },
+ "shimmer": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz",
+ "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw=="
+ },
+ "stack-chain": {
+ "version": "1.3.7",
+ "resolved": "https://registry.npmjs.org/stack-chain/-/stack-chain-1.3.7.tgz",
+ "integrity": "sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU="
+ },
+ "url": {
+ "version": "0.10.3",
+ "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz",
+ "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=",
+ "requires": {
+ "punycode": "1.3.2",
+ "querystring": "0.2.0"
+ }
+ },
+ "uuid": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
+ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
+ },
+ "xml2js": {
+ "version": "0.4.19",
+ "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
+ "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
+ "requires": {
+ "sax": ">=0.6.0",
+ "xmlbuilder": "~9.0.1"
+ }
+ },
+ "xmlbuilder": {
+ "version": "9.0.7",
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
+ "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
+ }
+ }
+}
diff --git a/lambda-optimizations/examples/serverless-warmup-plugin/.warmup/package.json b/lambda-optimizations/examples/serverless-warmup-plugin/.warmup/package.json
new file mode 100644
index 0000000..b8c7400
--- /dev/null
+++ b/lambda-optimizations/examples/serverless-warmup-plugin/.warmup/package.json
@@ -0,0 +1,15 @@
+{
+ "name": "warmup-function",
+ "version": "1.0.0",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "",
+ "license": "ISC",
+ "dependencies": {
+ "aws-sdk": "^2.868.0",
+ "aws-xray-sdk-core": "^3.2.0"
+ }
+}
diff --git a/lambda-optimizations/examples/serverless-warmup-plugin/handler.js b/lambda-optimizations/examples/serverless-warmup-plugin/handler.js
new file mode 100644
index 0000000..2ccec01
--- /dev/null
+++ b/lambda-optimizations/examples/serverless-warmup-plugin/handler.js
@@ -0,0 +1,16 @@
+'use strict';
+
+module.exports.hello = async (event) => {
+ console.log( JSON.stringify(event) );
+ return {
+ statusCode: 200,
+ body: JSON.stringify(
+ {
+ message: 'Go Serverless v1.0! Your function executed successfully!',
+ input: event,
+ },
+ null,
+ 2
+ ),
+ };
+};
diff --git a/lambda-optimizations/examples/serverless-warmup-plugin/package-lock.json b/lambda-optimizations/examples/serverless-warmup-plugin/package-lock.json
new file mode 100644
index 0000000..c83bb2b
--- /dev/null
+++ b/lambda-optimizations/examples/serverless-warmup-plugin/package-lock.json
@@ -0,0 +1,14 @@
+{
+ "name": "serverless-warmup-plugin-example",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "serverless-plugin-warmup": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/serverless-plugin-warmup/-/serverless-plugin-warmup-5.2.1.tgz",
+ "integrity": "sha512-kP/GrrNGsM2IehjNPY+NWPxONFI/Y5AZFphk5ZvY9koMbI0d6TFMs7ZHorrfmzEx2ggjGsxG8VlE7OhmHeLaRA==",
+ "dev": true
+ }
+ }
+}
diff --git a/lambda-optimizations/examples/serverless-warmup-plugin/package.json b/lambda-optimizations/examples/serverless-warmup-plugin/package.json
new file mode 100644
index 0000000..756f935
--- /dev/null
+++ b/lambda-optimizations/examples/serverless-warmup-plugin/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "serverless-warmup-plugin-example",
+ "version": "1.0.0",
+ "description": "",
+ "main": "handler.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "",
+ "license": "ISC",
+ "devDependencies": {
+ "serverless-plugin-warmup": "^5.2.1"
+ }
+}
diff --git a/lambda-optimizations/examples/serverless-warmup-plugin/serverless.yml b/lambda-optimizations/examples/serverless-warmup-plugin/serverless.yml
new file mode 100644
index 0000000..3dc9d08
--- /dev/null
+++ b/lambda-optimizations/examples/serverless-warmup-plugin/serverless.yml
@@ -0,0 +1,38 @@
+service: warmup-plugin
+frameworkVersion: '2'
+
+provider:
+ name: aws
+ runtime: nodejs12.x
+ lambdaHashingVersion: 20201221
+ iamRoleStatements:
+ - Effect: 'Allow'
+ Action:
+ - 'lambda:InvokeFunction'
+ Resource: "arn:aws:lambda:us-east-1:*"
+plugins:
+ - serverless-plugin-warmup
+custom:
+ warmup:
+ default:
+ enabled: true # Whether to warm up functions by default or not
+ memorySize: 256
+ name: warmer-default
+ role: IamRoleLambdaExecution
+ vpc: false
+ events:
+ - schedule: 'cron(0/2 8-17 ? * MON-FRI *)' # Run WarmUp every 5 minutes Mon-Fri between 8:00am and 5:55pm (UTC)
+ timeout: 20
+ tracing: true
+ prewarm: true # Run WarmUp immediately after a deploymentlambda
+ concurrency: 1 # Warm up 5 concurrent instances
+functions:
+ hello:
+ handler: handler.hello
+ events:
+ - httpApi:
+ path: /hello
+ method: get
+ warmup:
+ default:
+ enabled: dev