serverless / serverless-plugin-log-retention

Control the retention of your serverless function's cloudwatch logs.
MIT License
21 stars 17 forks source link

An optional parameter for non default Lamda Log groups name #6

Open zavale opened 3 years ago

zavale commented 3 years ago

After CF stack deletion, the log group may be re-created by CW service, since logs are delivered with some delay, after Lambda invocation. It may cause a problem when you try to re0deploy stack - it will fail with an error LogGroup - /aws/lambda/xxxxx already exists.. To solve it, serverless-plugin-log-retention may provide an option, or even create by default LogGroups with the non-default name. In this case, even if CW will recreate LogGroup for Lambda after Lambda removed, it will use the default name, and will not clash with the LogGroup name created during stack re-deployment