juanjoDiaz / serverless-plugin-warmup

Keep your lambdas warm during winter. ♨
MIT License
1.11k stars 115 forks source link

Invalid configuration encountered for logRetentionInDays #318

Closed alanwilter closed 2 years ago

alanwilter commented 2 years ago

Why this?

Warning: Invalid configuration encountered
  at 'custom.warmup.default.logRetentionInDays': must be equal to one of the allowed values

Learn more about configuration validation here: http://slss.io/configuration-validation

My serverless.yml:

...
  warmup:
    default:
      enabled: true
      events:
        - schedule: cron(0/5 1-23 ? * MON-SUN *)
      concurrency: 5
      verbose: true
      logRetentionInDays: 10

My setup:

{
  "dependencies": {
    "serverless": "^3.21.0"
  },
  "devDependencies": {
    "serverless-plugin-warmup": "^7.3.0",
    "serverless-prune-plugin": "^2.0.1"
  }
}
juanjoDiaz commented 2 years ago

Hi @alanwilter ,

The value of `` should be one of the valid values as stated in the docs (see https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutRetentionPolicy.html#API_PutRetentionPolicy_RequestSyntax).

I'll update the docs shortly.