question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support MaximumBatchingWindowInSeconds parameter for DynamoDB and Kinesis triggers

See original GitHub issue

This is a Feature Proposal

Description

See https://docs.aws.amazon.com/lambda/latest/dg/best-practices.html#stream-events

By default, Lambda invokes your function as soon as records are available in the stream. If the batch it reads from the stream only has one record in it, Lambda only sends one record to the function. To avoid invoking the function with a small number of records, you can tell the event source to buffer records for up to 5 minutes by configuring a batch window. Before invoking the function, Lambda continues to read records from the stream until it has gathered a full batch, or until the batch window expires.

See https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md#25200

feature: Lambda: Adds a “MaximumBatchingWindowInSeconds” parameter to event source mapping api’s. Usable by Dynamodb and Kinesis event sources.

Suggested config

functions:
  preprocess:
    handler: handler.preprocess
    events:
      - stream:
          arn: arn:aws:kinesis:region:XXXXXX:stream/foo
          batchSize: 100
          maximumBatchingWindowInSeconds: 300
          startingPosition: LATEST

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:24
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pgrzesikcommented, Dec 19, 2021
1reaction
Jwan622commented, Sep 25, 2019

You can use this in the meantime: https://serverless.com/framework/docs/providers/aws/guide/resources/#override-aws-cloudformation-resource

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using AWS Lambda with Amazon DynamoDB
With DynamoDB Streams, you can trigger a Lambda function to perform additional work each time a DynamoDB table is updated. Lambda reads records...
Read more >
Stream Processing with DynamoDB Streams and QLDB Streams
The MaximumBatchingWindowInSeconds parameter allows you to tune how long to wait before processing a batchm ideal for low traffic or tasks that ...
Read more >
Creates a mapping between an event source and an Lambda ...
Lambda reads items from the event source and triggers the function. ... error handling options are only available for stream sources (DynamoDB and...
Read more >
create-event-source-mapping — AWS CLI 2.9.9 Command ...
For information about which configuration parameters apply to each event source, see the following topics. Amazon DynamoDB Streams · Amazon Kinesis.
Read more >
aws_lambda_event_source_ma...
Resource: aws_lambda_event_source_mapping. Provides a Lambda event source mapping. This allows Lambda functions to get events from Kinesis, DynamoDB, SQS, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found