I am using serverless framework version 2.11.0
When trying to deploy, it is throwing serverless error:
Configuration error at 'provider.logRetentionInDays': should be equal to one of the allowed values
But it is not showing any allowed values. Also in my case I am giving the value as 90 (Integer). Anything which I am doing wrong?
I got same warning when I used the value as 2 (Integer). I checked in aws cloudwatch log retention settings. It lists some options as this image. Then I changed the value to 3, which is in the list, the warning message was disappeared.
The serverless plugin for setting logRetention internally uses the PutRetentionPolicy AWS api to set up the logRetentionPolicy by which we can set up a retention period. The api accepts only a set of valid values for the retention days as you can see in this link.
Also to make it never expire we simply don't have to set it to any logRetentionPolicy. (Reference)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With