I am a little confusing about how to re-deploy the existing API on Prod without downtime. I know there is blue/green deployment / canary model, but just have no idea how to do that. Anyone who has this kind of experience on how to set it up?
I was wondering if you found any answers on how to deploy either blue/green or canary scenario.
I’m still tinkering with this myself. There are a number of plugins that let you modify the CF template before it goes to AWS. I was thinking it might be possible to use that to setup a blue/green.
The Lambda functions themselves also offer traffic shifting based on the function versions but I’m not sure how to manage that using the serverless framework.
Anyone done this?
I wrote a plugin exactly for that, take a look and let me know if you found it useful!
Awesome… I will give this a try and let you know how it goes. I use another plugin that pushes changesets so seeing if they play friendly together will be interesting. I would guess that would rule out watching for alerts perhaps.
In case anyone is wondering you can use this canary plugin with the changesets plugin. Worked fine!
Thanks David working great for us!
Great job for this plugin, thank you !
Unfortunately the hook does not works if we use also serverless-domain-manager plugin.
Do you know how to make the hooks compatible with serverless-domain-manager plugin ?
Is there an other way to determine plugin compatibility (list on internet, …) than testing and see that it does not work ?
Ok, the problem came from the fact I used global VPC configuration (I didn’t know how CodeDeploy works).
I added the VPC configuration for each function in serverless.yml except for the hooks (no global VPC configuration that all functions inherit).