[{"data":1,"prerenderedAt":66},["ShallowReactive",2],{"pattern-appsync-direct-lambda-resolver":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":11,"deploy":13,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":29,"language":34,"level":35,"meta":36,"patternArch":37,"resources":50,"s3URL":6,"services":59,"stem":60,"testing":61,"videoId":28,"__hash__":65},"patterns\u002Fpatterns\u002Fappsync-direct-lambda-resolver.json","AWS AppSync to AWS Lambda",null,{"headline":8,"text":9},"Cleanup",[10],"To delete the stack, run: \u003Ccode>cdk destroy\u003C\u002Fcode>.",[12],"content\u002Fcontributors\u002Fami-patel.json",{"text":14},[15,16],"cdk deploy","See the GitHub repo for detailed instructions","Create an AppSync API with a direct Lambda resolver","json","AWS CDK",{"template":21,"payloads":26},{"projectFolder":22,"repoURL":23,"templateURL":24,"templateFile":25},"appsync-direct-lambda-resolver","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fappsync-direct-lambda-resolver","serverless-patterns\u002Fappsync-direct-lambda-resolver","cdk\u002Flib\u002Fmain.ts",[27],{"headline":28,"payloadURL":28},"",{"headline":30,"text":31},"How it works",[32,33],"This CDK application deploys an AppSync API and a Lambda function. The Lambda function is added as a data source for the API and the API uses it as a direct Lambda resolver.","On querying the AppSync API, AppSync invokes the Lambda function and provides default payload to your Lambda function as well as a default translation from a Lambda function's response to a GraphQL type.","TypeScript","200",{},{"icon1":38,"icon2":43,"line1":47},{"x":39,"y":40,"service":41,"label":42},20,50,"appsync","AWS AppSync",{"x":44,"y":40,"service":45,"label":46},80,"lambda","AWS Lambda",{"from":48,"to":49,"label":28},"icon1","icon2",{"headline":51,"bullets":52},"Additional resources",[53,56],{"text":54,"link":55},"Introducing Direct Lambda Resolvers","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fmobile\u002Fappsync-direct-lambda\u002F",{"text":57,"link":58},"Direct Lambda Resolvers mapping template reference","https:\u002F\u002Fdocs.aws.amazon.com\u002Fappsync\u002Flatest\u002Fdevguide\u002Fresolver-mapping-template-reference-lambda.html#direct-lambda-resolvers",{"from":41,"to":45},"patterns\u002Fappsync-direct-lambda-resolver",{"headline":62,"text":63},"Testing",[64],"See the GitHub repo for detailed testing instructions.","US7OCP9OF2arZkJCX2my0doR9fYUeZ2KDqAYUUTEe1o",1778846883196]