@studio/lambda
Advanced tools
+11
-0
| # Changes | ||
| ## 5.0.1 | ||
| - 🐛 [`446db5c`](https://github.com/javascript-studio/studio-lambda/commit/446db5c1925c71c71a9d46b8a2594483fe4dab25) | ||
| Fix max idle overtaking lambda timeout | ||
| - 📚 [`16953a0`](https://github.com/javascript-studio/studio-lambda/commit/16953a0c3d91773c58aa26930e985217010ce962) | ||
| Add missing documentation for timeout option | ||
| - 📚 [`e582183`](https://github.com/javascript-studio/studio-lambda/commit/e582183c319d65dd66abe5e1a7ee007c6184c541) | ||
| Remove bad link to apex | ||
| _Released by [Maximilian Antoni](https://github.com/mantoni) on 2024-08-28._ | ||
| ## 5.0.0 | ||
@@ -4,0 +15,0 @@ |
+3
-1
@@ -234,4 +234,4 @@ /* | ||
| clearTimeout(idle_timer); | ||
| idle_timer = null; | ||
| } | ||
| idle_timer = setTimeout(kill, max_idle); | ||
| const i = ++id; | ||
@@ -251,2 +251,4 @@ const ms_timeout = timeout * 1000; | ||
| kill(); | ||
| } else if (!err) { | ||
| idle_timer = setTimeout(kill, max_idle); | ||
| } | ||
@@ -253,0 +255,0 @@ callback(err, value); |
+1
-1
| { | ||
| "name": "@studio/lambda", | ||
| "version": "5.0.0", | ||
| "version": "5.0.1", | ||
| "description": "JavaScript Studio lambda execution environment", | ||
@@ -5,0 +5,0 @@ "author": "Maximilian Antoni <max@javascript.studio>", |
+3
-4
@@ -5,3 +5,2 @@ # Studio Lambda | ||
| each Lambda function in it's own process. Integrates with [Studio Gateway][2]. | ||
| Defaults are tailored for [apex][3]. | ||
@@ -34,2 +33,4 @@ ## Usage | ||
| to 5 seconds. | ||
| - `memory`: The default Lambda memory to use in MB. Defaults to 128 MB. This | ||
| will set `--max-old-space-size` on Lambda processes. | ||
| - `max_idle`: The idle timeout to use in milliseconds. If a function is | ||
@@ -63,4 +64,3 @@ not invoked for this time, the process gets destroyed. Defaults to 1 hour. | ||
| `000000000000`) and the Lambda function name. | ||
| - `memoryLimitInMB`: The configured memory limit. This is currently not | ||
| enforced. | ||
| - `memoryLimitInMB`: The configured memory limit. | ||
| - `awsRequestId`: The AWS request ID, either from `options` or generated. | ||
@@ -82,2 +82,1 @@ - `getRemainingTimeInMillis()`: Returns the remaining time until the Lambda | ||
| [2]: https://github.com/javascript-studio/studio-gateway | ||
| [3]: http://apex.run |
+17
-0
@@ -479,2 +479,19 @@ 'use strict'; | ||
| it('kills lambda after configured timeout if larger than max_idle', (done) => { | ||
| sinon.stub(log, 'warn'); | ||
| lambda = Lambda.create({ | ||
| max_idle: 25, | ||
| env: { | ||
| AWS_PROFILE: 'local' | ||
| } | ||
| }); | ||
| lambda.invoke('timeout-file', {}, (err) => { | ||
| assert.json(err, { code: 'E_TIMEOUT' }); | ||
| assert.calledOnce(log.warn); | ||
| done(); | ||
| }); | ||
| }); | ||
| it('does not fail to talk to lambda after two where killed', (done) => { | ||
@@ -481,0 +498,0 @@ sinon.stub(log, 'warn'); |
Sorry, the diff of this file is not supported yet
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 10 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 10 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
58477
2.64%1309
1.24%79
-1.25%