- 最新
- 最多得票
- 最多評論
AppSync blocks access to all tools and macros by default and the $math tool is included. I will record a feature request to look into enabling a subset of the built in tools for use cases like this. In the meantime, I would suggest using a lambda resolver.
Thanks for the info! We're using the Amplify framework which generates VTL templates by default which is why I went down this path, but I'll take a look at a lambda resolver.
Hi @MichaelParis,
I have the same issue, trying to write processing logic in VTL which requires MathTool and SortTool and those are not supported at the moment.
By the way would you be able to comment on performance of native AppSync resolvers with Get/Put/Scan/Query Dynamo DB logic chained as a pipeline resolver functions versus the same logic but implemented using Lambda resolvers?
I'm interested in how AppSync handles the requests in those two different scenarios under the hood, especially will the latency and response time be comparable for both, or using native AppSync resolvers is more beneficial and recommended?
Thanks.
A pipeline resolver is essentially a set of function resolvers executed sequentially. So let's say the DynamoDB Put resolver takes "x" ms, and Scan resolver takes "y" ms, if you add these to the pipeline, it would essentially take "x+y" ms to resolve the field.
If you use a Lambda resolver, there is an additional hop in the flow of your request, so it could have additional latencies involved, since your request would be sent to the Lambda function, which in turn hits the DynamoDB tables.
AppSync <=> DynamoDB (DynamoDB resolver)
AppSync <=> Lambda <=> DynamoDB (Lambda resolver)
AWS AppSync does not recommend one over the other, it really depends on the use case and you should choose a strategy that works best for you.
Hi @Shankar-AWS and thanks for the comment,
I’m wondering if you’d be able to comment on this thread https://news.ycombinator.com/item?id=17551502
From what it looks like appwiz recommends VTL over Lambda wherever it’s possible, and also not clear if VTL are still a subject to cold starts.
Thanks.
Is there a space we can track this?
Thought I would sign up to show my interest in this being added.
To maintain a evenly spaced DynamoDB key spacing I using sharding, with the scatter and gather idea.
Having to use a lambda to generate a random number between a range would be an extra cost etc. for something that could be done in the request resolver.
I feel like this is quite an important addition to encourage and implement good noSQL design with ease.
It's a +1 from me :)
Thanks
There is a feature request for that: https://github.com/aws/aws-appsync-community/issues/40
相關內容
- 已提問 6 個月前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前