-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(Lambda) DynamoDB to Lambda trigger batch size limit is just 1000 for CDK #19285
Comments
The documentation in CloudFormation, which we are limited by, is incorrect (likely outdated, like this code) You can work around this for now until we fix it with escape hatches for (const child of handler.node.children) {
if (child instanceof EventSourceMapping) {
let map = child as EventSourceMapping;
let cfnmap = map.node.defaultChild as CfnEventSourceMapping
cfnmap.addPropertyOverride('BatchSize', 10000)
}
} |
fixes #19285 I can successfully deploy a stack by overriding the batch size to 10000 - need to contact cloudformation team to update their docs ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
fixes aws#19285 I can successfully deploy a stack by overriding the batch size to 10000 - need to contact cloudformation team to update their docs ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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)

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
The text was updated successfully, but these errors were encountered: