Skip to content

(Lambda) DynamoDB to Lambda trigger batch size limit is just 1000 for CDK #19285

@pratik-g16

Description

@pratik-g16

What is the problem?

While creating a trigger for Lambda using DynamoDB Streams as source, the CDK allows only 1000 to be set as the maximum batch size. However in the documentation and using the console, we can create a trigger with a maximum batch size of 10000 records.

Reproduction Steps

handler.addEventSource(
new DynamoEventSource(table, {
startingPosition: lambda.StartingPosition.LATEST,
batchSize: 10000 })
);

What did you expect to happen?

By this code i was expecting that a trigger will be created from DynamoDB to Lambda with a batch size of 10k records.

What actually happened?

Error: Maximum batch size must be between 1 and 1000 inclusive (given 10000)
error

CDK CLI Version

2.15.0

Framework Version

No response

Node.js Version

v16.14.0

OS

Mac Os

Language

Typescript

Language Version

4.6.2

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-lambdaRelated to AWS LambdabugThis issue is a bug.effort/smallSmall work item – less than a day of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions