Skip to content

Commit

Permalink
feat: lambda worker - support maxConcurrency (SqsEventSource)
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanja-kovacevic-thinkit committed Apr 1, 2024
1 parent bc3a840 commit 2125fac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/lambda-worker/lambda-worker-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface LambdaWorkerProps {
timeout: cdk.Duration;
vpc?: ec2.IVpc;
vpcSubnets?: ec2.SubnetSelection;
maxConcurrency?: number;
} & Partial<FunctionLambdaProps> &
Partial<ContainerFromEcrLambdaProps> &
Partial<ContainerFromImageAssetLambdaProps>;
Expand Down
1 change: 1 addition & 0 deletions lib/lambda-worker/lambda-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export class LambdaWorker extends Construct {
new SqsEventSource(lambdaQueue, {
enabled: props.lambdaProps.enableQueue ?? true,
batchSize: 1,
maxConcurrency: props.lambdaProps.maxConcurrency,
}),
);
lambdaWorker.addEventSource(
Expand Down

0 comments on commit 2125fac

Please sign in to comment.