diff --git a/lib/lambda-worker/lambda-worker-props.ts b/lib/lambda-worker/lambda-worker-props.ts index d71afa4..50471eb 100644 --- a/lib/lambda-worker/lambda-worker-props.ts +++ b/lib/lambda-worker/lambda-worker-props.ts @@ -45,6 +45,7 @@ export interface LambdaWorkerProps { timeout: cdk.Duration; vpc?: ec2.IVpc; vpcSubnets?: ec2.SubnetSelection; + queueMaxConcurrency: number; } & Partial & Partial & Partial; diff --git a/lib/lambda-worker/lambda-worker.ts b/lib/lambda-worker/lambda-worker.ts index 776ed7f..bf9df48 100644 --- a/lib/lambda-worker/lambda-worker.ts +++ b/lib/lambda-worker/lambda-worker.ts @@ -141,6 +141,7 @@ export class LambdaWorker extends Construct { new SqsEventSource(lambdaQueue, { enabled: props.lambdaProps.enableQueue ?? true, batchSize: 1, + maxConcurrency: props.lambdaProps.queueMaxConcurrency, }), ); lambdaWorker.addEventSource(