I would like to specify the
maximumBatchingWindow property for an SQS event. It is mentioned here in the docs, but it does not seem to work.
I am still on serverless v1, and my yaml contains something like this:
messageProcessor: handler: com.me.MessageProcessor timeout: 60 memorySize: 2048 reservedConcurrency: 1 events: - sqs: batchSize: 20 # can be larger: total pay-load cannot exceed 6MB maximumBatchingWindow: 1 # cannot be zero arn: Fn::GetAtt: - messagesQ - Arn
But when I try to apply these settings I get this error from AWS:
Invalid request provided: Maximum batch window in seconds must be greater than 0 if maximum batch size is greater than 10 (Service: Lambda, Status Code: 400, Request ID
Which leads me to believe that the setting is ignored.
Is there some workaround I can try, or will it work only after I upgrade to v2?