How to set reserved concurrency of a lambda function



  • I have serveral lambda functions (all in the same region) and I want to limit the concurrency of one of them to a very small value. Specifically, I do not want more than 3 instances of this function running concurrently. This function is not expected to receive a lot of traffic so setting its Reserve concurrency to a low value makes a lot of sense.

    When I try to set this function's Reserve concurrency I get a rejection message (screeshot below) as follows: The unreserved account concurrency can't go below 100.

    What should I do to be able to restrict the concurrency of this function?

    (FWIW, the Unreserved account concurrency of my account is 100)

    enter image description here



  • Functions that don't have reserved concurrency defined need to be able to scale when necessary. AWS insists that you leave 100 invocations for such functions.

    you can use upto Unreserved account concurrency minus 100 when defining reserved concurrency for your functions.

    You can reserve up to the Unreserved account concurrency value that is shown, minus 100 for functions that don't have reserved concurrency. To throttle a function, set the reserved concurrency to zero. This stops any events from being processed until you remove the limit.

    Use GetAccountSettings to see your Regional concurrency limit. You can reserve concurrency for as many functions as you like, as long as you leave at least 100 simultaneous executions unreserved for functions that aren't configured with a per-function limit.

    https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2