Skip to content

Commit a1bb07b

Browse files
feat: add reservedConcurrency support (#538)
Co-authored-by: Daniel Cottone <[email protected]>
1 parent 7cc8aa9 commit a1bb07b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,19 @@ custom:
185185
esLogs:
186186
xrayTracingPermissions: true
187187
188+
provider:
189+
tracing:
190+
apiGateway: true
191+
```
192+
#### reservedConcurrency
193+
194+
(Optional) Sets the reservedConcurrency of the lambda
195+
196+
```yaml
197+
custom:
198+
esLogs:
199+
reservedConcurrency: 3
200+
188201
provider:
189202
tracing:
190203
apiGateway: true

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ class ServerlessEsLogsPlugin {
265265
}
266266

267267
private addLogProcesser(): void {
268-
const { index, indexDateSeparator, endpoint, tags, vpc } = this.custom().esLogs;
268+
const { index, indexDateSeparator, endpoint, tags, vpc, reservedConcurrency } = this.custom().esLogs;
269269
const tagsStringified = tags ? JSON.stringify(tags) : /* istanbul ignore next */ '';
270270
const dirPath = path.join(this.serverless.config.servicePath, this.logProcesserDir);
271271
const filePath = path.join(dirPath, 'index.js');
@@ -284,6 +284,7 @@ class ServerlessEsLogsPlugin {
284284
vpc,
285285
events: [],
286286
handler,
287+
reservedConcurrency,
287288
memorySize: 512,
288289
name,
289290
package: {

0 commit comments

Comments
 (0)