# maximumBatchingWindow not passed to AWS

**URL:** <https://forum.serverless.com/t/maximumbatchingwindow-not-passed-to-aws/13837>\
**Category:** Serverless Framework\
**Tags:** aws, lambda, cloudformation\
**Created:** [January 22, 2021, 2:39pm UTC](https://forum.serverless.com/t/maximumbatchingwindow-not-passed-to-aws/13837 "2021-01-22T14:39:54Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Willem](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/willem/32/5120_2.png) [@Willem](https://forum.serverless.com/u/Willem)\
**Post date:** [January 22, 2021, 2:39pm UTC](https://forum.serverless.com/t/maximumbatchingwindow-not-passed-to-aws/13837/1 "2021-01-22T14:39:54Z")

</div>

I would like to specify the `maximumBatchingWindow` property for an SQS event. It is mentioned [here in the docs](https://www.serverless.com/framework/docs/providers/aws/events/sqs/), but it does not seem to work.

I am still on serverless v1, and my yaml contains something like this:

```auto
  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:

```nohighlight
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?

---

<div class="post-metadata">

**Author:** ![mapoulos](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/mapoulos/32/5196_2.png) [@mapoulos](https://forum.serverless.com/u/mapoulos)\
**Post date:** [February 4, 2021, 6:37pm UTC](https://forum.serverless.com/t/maximumbatchingwindow-not-passed-to-aws/13837/2 "2021-02-04T18:37:29Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![patrickwerz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/patrickwerz/32/5062_2.png) [@patrickwerz](https://forum.serverless.com/u/patrickwerz)\
**Post date:** [February 10, 2021, 7:23pm UTC](https://forum.serverless.com/t/maximumbatchingwindow-not-passed-to-aws/13837/3 "2021-02-10T19:23:30Z")

</div>

> [@Willem](#):
>
> ` I’d named the property maximumBatchWindow instead of maximumBatchingWindow`

I guess the documentation should be correct.

your suggestion is also not working for me

---

<div class="post-metadata">

**Author:** ![oba11](https://avatars.discourse-cdn.com/v4/letter/o/4da419/32.png) [@oba11](https://forum.serverless.com/u/oba11)\
**Post date:** [February 16, 2021, 11:39am UTC](https://forum.serverless.com/t/maximumbatchingwindow-not-passed-to-aws/13837/4 "2021-02-16T11:39:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![karan](https://avatars.discourse-cdn.com/v4/letter/k/58f4c7/32.png) [@karan](https://forum.serverless.com/u/karan)\
**Post date:** [February 17, 2021, 12:09am UTC](https://forum.serverless.com/t/maximumbatchingwindow-not-passed-to-aws/13837/5 "2021-02-17T00:09:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jlarroque](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/jlarroque/32/5684_2.png) [@jlarroque](https://forum.serverless.com/u/jlarroque)\
**Post date:** [May 7, 2021, 3:33pm UTC](https://forum.serverless.com/t/maximumbatchingwindow-not-passed-to-aws/13837/6 "2021-05-07T15:33:49Z")

</div>

> For me, it was not working for serverless V1.7. I updated the serverless to 2.23 and it started working.

It would be great if serverless team can specify what version of serverless support each functionality in documentation

---

<div class="post-metadata">

**Author:** ![SFJ](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/sfj/32/5971_2.png) [@SFJ](https://forum.serverless.com/u/SFJ)\
**Post date:** [July 9, 2021, 8:49am UTC](https://forum.serverless.com/t/maximumbatchingwindow-not-passed-to-aws/13837/7 "2021-07-09T08:49:35Z")

</div>

It still doesn’t work with latest version of serverless.

---

<div class="post-metadata">

**Author:** ![romainderocle](https://avatars.discourse-cdn.com/v4/letter/r/b5a626/32.png) [@romainderocle](https://forum.serverless.com/u/romainderocle)\
**Post date:** [January 4, 2022, 8:30am UTC](https://forum.serverless.com/t/maximumbatchingwindow-not-passed-to-aws/13837/8 "2022-01-04T08:30:46Z")

</div>

Same problem here with v2.70.0

---

<div class="post-metadata">

**Author:** ![michael](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@michael](https://forum.serverless.com/u/michael)\
**Post date:** [August 30, 2022, 9:52am UTC](https://forum.serverless.com/t/maximumbatchingwindow-not-passed-to-aws/13837/9 "2022-08-30T09:52:54Z")

</div>

It is only supported on version 2.14.0 and above, so you must upgrade your version.

This is the release features: [Release 2.14.0 (2020-12-01) · serverless/serverless · GitHub](https://github.com/serverless/serverless/releases/tag/v2.14.0)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/serverless/original/2X/e/ed5f3589b50dbbd050b97560de3a93ba993693c7.png)
