fix(appsync): send VTL Lambda payload to function (#4579)

* fix(appsync): pass JS Lambda request envelope to function

Signed-off-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>

* fix(appsync): send VTL Lambda payload to function

---------

Signed-off-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
This commit is contained in:
XuJian authored and GitHub committed 2026-09-28 21:25:53 -04:00
1 parent dad5648b7b
commit 11b762d08b
4 files changed
+66 -20

No files matched your search

@@ -61,8 +61,8 @@ public class LambdaDataSourceInvoker implements AppSyncDataSourceInvoker {
@Override
public Object invokeVtl(DataSource dataSource, Object request, String region) {
// AWS sends the entire resolved VTL request document to the Lambda function.
return invokeOnce(functionArn(dataSource), request, region);
Object payload = request instanceof Map<?, ?> map ? map.get("payload") : null;
return invokeOnce(functionArn(dataSource), payload, region);
}
private Object invokeOnce(String functionArn, Object payload, String region) {