maximumBatchingWindow not passed to AWS

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:

    timeout: 60
    memorySize: 2048
    reservedConcurrency: 1
      - sqs: 
          batchSize: 20  # can be larger: total pay-load cannot exceed 6MB
          maximumBatchingWindow: 1 # cannot be zero
              - 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?


I don’t have the same problem, FWIW in the latest release. I was hitting the same error initially, but it was because I’d named the property maximumBatchWindow instead of maximumBatchingWindow

I guess the documentation should be correct.

your suggestion is also not working for me

Same thing for me, doesn’t seem to be working.

For me, it was not working for serverless V1.7. I updated the serverless to 2.23 and it started working.
for V1.7 it was not picking up batchSize and maximumBatchingWindow
For V2.23 its working now and changes are reflected in aws console