简体   繁体   中英

How many messages can a single AWS Lambda function process at once?

I have project with the following workflow:

  1. Pull files from server and upload to S3
  2. When files hit S3, a message is sent to a topic using SNS
  3. The lambda function subscribed to said topic will then process files by doing calculations

So far, I have not experienced any issues, but I wonder if this is a use case for SQS ?

How many messages can my Lambda function handle all at once? If I am pulling hundreds of files, is SQS a necessity?

By default, parallel invocation limit is set for 1000.

You can change that limitation, but i never hit that number so far.

As soon as a lambda is done with consuming current request, it will be used for another, so if you upload 1000 files, you probably will only need about 100 lambdas, unless you need Minutes for one lambda to run.

The AWS handles the queued triggers, so even if you upload 100.000 files, they will be consumed asap, depending on diverse criteria.

You can test it with creating many little files and upload them all at once:)

For higher speed, upload them to different bucket, and simply move from bucket to bucket (speed is higher this way)

gl !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM