I am writing a cloudformation serverless yaml for a lambda function. I need a conditional parameter reservedConcurrency to be 100 if IsProduction is true, 20 if false. But error happens when I deploy the yaml file:
You should use integer as reservedConcurrency value on function
resources:
Conditions:
IsProduction:
Fn::Equals:
- ${self:provider.stage}
- production
functions:
somefunction:
handler: functions/somefunction
timeout: 300
events:
- sqs:
arn:
Fn::GetAtt: [ somequeue, Arn ]
batchSize: 10
reservedConcurrency:
Fn::If:
- IsProduction
- 100
- 20