Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQS batchSize is not limited to 10 when using maxBatchingWindow #208

Closed
gfaramaz opened this issue May 24, 2022 · 4 comments
Closed

SQS batchSize is not limited to 10 when using maxBatchingWindow #208

gfaramaz opened this issue May 24, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@gfaramaz
Copy link

Start from the Use-case

Lift version: 1.17.0

I'm writing an SQS construct for batch processing a lot a message every 3 minutes or 1000 events

constructs: {
    'event-queue': {
      type: 'queue',
      batchSize: 1000,
      maxBatchingWindow: 180,
      worker: {
        handler: 'src/handler.receiver',
        memorySize: 256,
        reservedConcurrency: 1,
      },
    },
  },

On deploy I have an error

Warning: Invalid configuration encountered
  at 'constructs.event-queue': unsupported number format

It's because batch size is limited to 10 which isn't true anymore in AWS since end of 2020 when having the maxBatchingWindow option.

As a workaround I specify it manually in serverless extensions

resources: {
    extensions: {
      <EventSourceMappingLogicalIdFromCloudFormation>: {
        Properties: {
          BatchSize: 1000,
        },
      },
    },
}

Example Config

No response

Implementation Idea

No response

@gfaramaz gfaramaz added the enhancement New feature or request label May 24, 2022
@joawan
Copy link
Contributor

joawan commented Mar 13, 2023

Any chance this issue can be looked at? Would be really great to be able to easily use batch sizes bigger than 10.

@mnapoli
Copy link
Member

mnapoli commented Mar 13, 2023

@joawan this issue is open to contributions, feel free to look at it 👍

@joawan
Copy link
Contributor

joawan commented Mar 17, 2023

I looked at it. Hopefully this is good enough. Let me know if there's something missing. Have a great weekend!

@joawan
Copy link
Contributor

joawan commented Mar 22, 2023

@mnapoli just a friendly ping, do you think it looks alright?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants