Description
Describe the feature
With the introduction of #14079 you are able to configure a Lambda resolver to use BatchInvoke
by setting the appropriate request mapping template. However, this is limited to only 5 items per batch by default. CfnResolver
, used under the hood exposes the maxBatchSize
property to configure this limit.
Use Case
Having the batch size limited to 5 can make some use cases less performance and frustrating to use. Having it configurable should allow for these use cases to consume less resources and be more performant.
Proposed Solution
Add the ability to configure the maxBatchSize
property in the created CfnResolver
construct created by appsync.Resolver
by adding a maxBatchSize
property to ResolverProps
(docs)
The underlying implementation would just pass this property when creating a CfnResolver
(source)
Other Information
If the maxBatchSize
property can simply be exposed I'd be willing to create a PR for this. We could also automatically use the correct request mapping if one isn't provided (MappingTemplate.lambdaRequest('$util.toJson($ctx)', 'BatchInvoke')
).
If additional work beyond this is required to implement this properly I may not be able to provide an implementation.
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
v2.24.0
Environment details (OS name and version, etc.)
Any
Activity