serverless / serverless-plugin-log-retention

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

Serverless logRetentionInDays provider parameter now supercedes this plugin #10

Open chrisgilbert opened 2 years ago

chrisgilbert commented 2 years ago

When looking for a solution to set log retention for API gateway, I found that the serverless framework provides it's own logRetentionInDays parameter: https://www.serverless.com/framework/docs/providers/aws/guide/serverless.yml#general-function-settings

That is used for lambda log groups, in the same way as this plugin.

The provider parameter is also used for API gateway logs, though it doesn't seem to be documented: https://github.com/serverless/serverless/blob/v2/lib/plugins/aws/package/compile/events/apiGateway/lib/stage.js#L113

So there is probably no need for this plugin or serverless-apigateway-log-retention for most use cases.