cdk-patterns / serverless

This is intended to be a repo containing all of the official AWS Serverless architecture patterns built with CDK for developers to use. All patterns come in Typescript and Python with the exported CloudFormation also included.
https://cdkpatterns.com
MIT License
2.28k stars 272 forks source link

How to set the max number of concurrent Lambda executions? #264

Open moltar opened 2 years ago

moltar commented 2 years ago

https://github.com/cdk-patterns/serverless/blob/main/the-scalable-webhook/README.md

Now we have our messages in a queue but we need to subscribe to the queue and insert the records into the DB. To do this we create a throttled lambda where we set the max number of concurrent executions to whatever scale we are happy with. This should be less than the max connections on our DB and should take into account any other Lambdas running in this account.

How does one achieve that?

Thanks