Home > front end >  Downtime while changing Lambda runtime version
Downtime while changing Lambda runtime version

Time:01-12

We have a Lambda with runtime version nodejs 10.x, and we want to upgrade it to nodejs 12.x. Will there be any downtime during this change? I found a similar question that asks about downtime during version upgrade. Will there be any downtime during changing runtime version of a lambda?

CodePudding user response:

Lambda functions are not constantly running; they will handle a request and then sleep until the next request. If the function is dormant for a period of time determined by AWS then the state of the function will be disposed and the lambda will need to start from fresh again. Or if another request is received before the previous one has finished being handled then another instance of the function will start executing concurrently. During a lambda version update all running instances of the previous version will be allowed to complete and then be disposed and the new version will then take over. So, the downtime is only as long as it takes for the new version of the lambda function to start up and requests will not be rejected during this time, they will be executed when the function is ready.

  •  Tags:  
  • Related