0

I have a dynamodb table. Whenever I add a new item to the table, a lambda function is triggered, certain processing is done and the new item is updated. It works fine, but I was wondering what if thousands of items were added at once. Will the function execute for all items at once?? Or will the execution be queued?

3 Answers 3

1

From Managing Concurrency, official document for AWS Lambda

Functions scale automatically based on incoming request rate

So, it means that if requests are concurrent then to handle these requests multiple instances of the same function will execute. Some of the requests may be queued.

Also from the same documentation,

By default, AWS Lambda limits the total concurrent executions across all functions within a given region to 1000.

Sign up to request clarification or add additional context in comments.

3 Comments

In my research, I have come across 'lambda workers' multiple times...Do I need to setup for lambda workers for managing dynamodb streams?
@ManojAcharya can you please share the document where you read this term. And in my experience, you don't need to setup anything else other than the Lambda Function itself.
I must have misunderstood then!! Thanks for your kind help.
0

Lambda has 100 parallel Lambda executions assuming each execution takes 1 second or more to complete.

so at a time Lambda can manage multiple executions.

Comments

0

From Understanding Scaling Behavior

For Lambda functions that process Kinesis or DynamoDB streams the number of shards is the unit of concurrency

Amounts of shards depend on your partition key cardinality. For example, if your partition key cardinality is 2, then you have only two shards, and concurrency of your lambda is 2.

Remember you can't control a number of shards explicit. This is a related question

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.