diff --git a/README.md b/README.md index 4e95e9e3..30d8b743 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/index.ts b/src/index.ts index b1c57dbf..2a7fcd97 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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'); @@ -284,6 +284,7 @@ class ServerlessEsLogsPlugin { vpc, events: [], handler, + reservedConcurrency, memorySize: 512, name, package: {