Skip to content
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

@aws-cdk/aws-appsync-alpha: Unable to set BatchSize for Lambda Direct Resolvers #20467

Closed
1 of 2 tasks
andres-sm opened this issue May 23, 2022 · 1 comment · Fixed by #20995
Closed
1 of 2 tasks

@aws-cdk/aws-appsync-alpha: Unable to set BatchSize for Lambda Direct Resolvers #20467

andres-sm opened this issue May 23, 2022 · 1 comment · Fixed by #20995
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

Comments

@andres-sm
Copy link

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

@andres-sm andres-sm added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 23, 2022
@github-actions github-actions bot added the @aws-cdk/aws-appsync Related to AWS AppSync label May 23, 2022
@otaviomacedo otaviomacedo added p1 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jun 27, 2022
@otaviomacedo otaviomacedo removed their assignment Jun 27, 2022
@mergify mergify bot closed this as completed in #20995 Jul 13, 2022
mergify bot pushed a commit that referenced this issue Jul 13, 2022
closes #20467

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants