By default, AWS uses the LATEST
alias for the latest lambda version updated and I assume the below step.
LATEST
alias points version 5.LATEST
alias still points version 5. LATEST
alias to version 6.Through the steps, lambda seems to have almost 0 downtime.
However, It is just an assumption.
Is there any document explicitly mentioning about the downtime while deploying the new version? I just want to know how much AWS guarantee downtime while deploying the new version.
I also found similar question here, however not clear for my question.
It creates a CodeDeploy application and deployment group. The deployment group manages the rolling deployment and the rollback (if needed). It detects when you create a new version of your Lambda function. It triggers CodeDeploy to start the deployment of the new version.
The whole process takes 10 minutes to complete. After completion, open the Lambda console and verify that the “live” alias now points to version 2: After 10 minutes, the deployment is complete and CodeDeploy signals success to CloudFormation and completes the stack update.
At the highest level, throttling just means that Lambda will intentionally reject one of your requests and so what we see from the user side is that when making a client call, Lambda will throw a throttling exception, which you need to handle. Typically, people handle this by backing off for some time and retrying.
Note: When a Lambda function invocation times out, a Task timed out error message appears in the failed invocation's CloudWatch logs, not an Error message. If you search your function's CloudWatch logs for Error messages only, then the search returns only code-related runtime errors, not invocation timeout errors.
AWS Lambda uses containers for deployment. If I had to guess, AWS is spinning up Version 6 while Version 5 is still active, then once Version 6 is ready, it applies whatever changes necessary to point traffic to the now live Version 6. The below article mentions somewhat the AWS Lambda container lifecycle:
https://aws.amazon.com/blogs/compute/container-reuse-in-lambda/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With