mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
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:
1 parent
dad5648b7b
commit
11b762d08b
4 files changed
+66
-20
No files matched your search
+2
-2
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user