2

I'm having issues on using EC2 Parameter Store SSM Parameters in serverless.yml file for setting logRetentionInDays configuration value.

I'm getting error that logRetentionInDays should be an integer over 0. Is there any possibility to use SSM here?

I think the problem is that the parameter is read as String value instead of Number, but not sure. Wrong SSM key is failing to find the value so reference is correct.

Any ideas?

service: order-service

provider:
  name: aws
  runtime: nodejs8.10
  stage: ${opt:stage, 'dev'}
  region: eu-central-1
  deploymentBucket: tools
  logRetentionInDays: ${ssm:/logging/retention/info}
  • hi @Matti Simperi, were you able to get this issue resolved? I am facing same model validation error of logRetentionInDays property due to incorrect type. I am using it like this in my serverless.yml: `logRetentionInDays: ${file(env.yml):${self:custom.myStage}.AWS_LOG_RETENTION_IN_DAYS}​​​​​​​​` – Shashank Srivastava Jan 09 '23 at 05:54

0 Answers0