@aws-cdk/aws-appsync-alpha: Unable to set BatchSize
for Lambda Direct Resolvers
#20467
Closed
1 of 2 tasks
Labels
@aws-cdk/aws-appsync
Related to AWS AppSync
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p1
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 themaxBatchSize
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 createdCfnResolver
construct created byappsync.Resolver
by adding amaxBatchSize
property toResolverProps
(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
CDK version used
v2.24.0
Environment details (OS name and version, etc.)
Any
The text was updated successfully, but these errors were encountered: