Skip to content

Commit

Permalink
feat: add reservedConcurrency support (#538)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Cottone <[email protected]>
  • Loading branch information
kirill578 and daniel-cottone authored Oct 27, 2022
1 parent 7cc8aa9 commit a1bb07b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,19 @@ custom:
esLogs:
xrayTracingPermissions: true
provider:
tracing:
apiGateway: true
```
#### reservedConcurrency

(Optional) Sets the reservedConcurrency of the lambda

```yaml
custom:
esLogs:
reservedConcurrency: 3
provider:
tracing:
apiGateway: true
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class ServerlessEsLogsPlugin {
}

private addLogProcesser(): void {
const { index, indexDateSeparator, endpoint, tags, vpc } = this.custom().esLogs;
const { index, indexDateSeparator, endpoint, tags, vpc, reservedConcurrency } = this.custom().esLogs;
const tagsStringified = tags ? JSON.stringify(tags) : /* istanbul ignore next */ '';
const dirPath = path.join(this.serverless.config.servicePath, this.logProcesserDir);
const filePath = path.join(dirPath, 'index.js');
Expand All @@ -284,6 +284,7 @@ class ServerlessEsLogsPlugin {
vpc,
events: [],
handler,
reservedConcurrency,
memorySize: 512,
name,
package: {
Expand Down

0 comments on commit a1bb07b

Please sign in to comment.