There is a following setup:
serverless.yml
api.mydomain.com
) attached to API Gatewaydev
and prod
)abcdefg.cloudfront.net
There's a high-level task to update two lambda functions without the downtime for the API that they are serving. How to do it using serverless framework?
Note: there are two ways to manage lambda deployments: stages and aliases (versions). Currently aliases do not work in serverless (there's a fork that hotfixes the issue, but it does not matter atm).
There is no downtime when updating a lambda function using the Serverless Framework, simply by running sls deploy
.
The function code is zipped and uploaded to Lambda, and when that is completed, CloudFormation will update the Lambda configuration to point to the new code. There is no downtime in this process.