I have been trying to update to Serverless 1.1.0 which requires me to delete the original Log group. The thing is I have the code running on production already, the log group will be automatically created due to new traffic within seconds after I delete the original log group. It is very difficult for me to deploy.
Is there any way that I can upgrade to serverless 1.1.0 without stopping the running production server?
Unfortunately I’m not aware of an “offical” upgrade path that doesn’t involve bringing down your service - this is why Semver major revision numbers exist: breaking/non-backwards-compatible changes.
A hacky, un-tested, work-around comes to mind: Remove
logs:CreateLogGroup permission (via the Console) from the associated IAM Role, so that the function is not allowed to create log groups in the future. In my past experience a function without proper CloudWatch access will continue to work fine, there will just be no logs to see. Hopefully your new deployment will then be able create it’s own group with the same name.
Thanks so much! Works like a charm!
I know the semver but it is just that I still want to do it without breaking the current production.
Really great workaround! Thanks again!