[{"data":1,"prerenderedAt":81},["ShallowReactive",2],{"pattern-sfn-choice-jev-typescript-cdk":3,"pattern-group-sfn-choice-jev-typescript-cdk":6},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":20,"extension":21,"framework":22,"gitHub":23,"highlight":6,"introBox":27,"language":33,"level":34,"meta":35,"patternArch":36,"patternGroup":6,"patternGroupLabel":6,"resources":64,"stem":75,"testing":76,"videoId":6,"__hash__":80},"patterns\u002Fpatterns\u002Fsfn-choice-jev-typescript-cdk.json","AWS Step Functions HTTP Task to TypeSafe Jev confidence gate",null,{"text":8},[9],"Delete the stack: \u003Ccode>npx cdk destroy\u003C\u002Fcode>. This also deletes the review queues and any tickets still in them.",[11],"content\u002Fcontributors\u002Fnithin-chandran-r.json",{"text":13},[14,15,16,17,18,19],"\u003Ccode>git clone https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u003C\u002Fcode>","\u003Ccode>cd serverless-patterns\u002Fsfn-choice-jev\u002Ftypescript\u002Fcdk\u003C\u002Fcode>","\u003Ccode>npm install\u003C\u002Fcode>","\u003Ccode>npx cdk bootstrap\u003C\u002Fcode>","\u003Ccode>read -rs JEV_API_KEY\u003C\u002Fcode>","\u003Ccode>npx cdk deploy --parameters JevApiKey=\"$JEV_API_KEY\"\u003C\u002Fcode>","An AWS Step Functions Choice state acts on TypeSafe Jev answers only when Jev is confident; the rest, and any failed Jev call, go to an Amazon SQS review queue.","json","AWS CDK",{"template":24},{"patternPath":25,"templateFile":26},"sfn-choice-jev\u002Ftypescript\u002Fcdk","lib\u002Fsfn-choice-jev-stack.ts",{"headline":28,"text":29},"How it works",[30,31,32],"This pattern deploys an Amazon API Gateway REST API that starts an AWS Step Functions Express workflow synchronously. An HTTP Task in the workflow calls the TypeSafe Jev API through an Amazon EventBridge connection that holds the API key, so no AWS Lambda function sits in the request path. Jev answers three typed questions about a support ticket in one call: a choice for the owning department, a score for urgency, and a yes\u002Fno question about an active security incident.","A Choice state is the confidence gate. A ticket is auto-routed only when the department and urgency confidences clear their thresholds and a security incident is not suspected. A suspected security incident is published to an Amazon SNS topic and still goes to a person. Everything else, including any ticket for which the Jev call failed or returned something unusable, goes to an Amazon SQS human-review queue with a dead-letter queue behind it.","You need a TypeSafe account and API key, which is billed by TypeSafe separately from AWS.","TypeScript","300",{},{"icon1":37,"icon2":42,"icon3":46,"icon4":51,"line1":55,"line2":58,"line3":61},{"x":38,"y":39,"service":40,"label":41},15,43,"apigw","Amazon API Gateway\nREST API",{"x":43,"y":39,"service":44,"label":45},45,"sfn","AWS Step Functions\nExpress workflow",{"x":47,"y":48,"service":49,"label":50},87,20,"sns","Amazon SNS\nSecurity alerts",{"x":47,"y":52,"service":53,"label":54},66,"sqs","Amazon SQS\nHuman-review queue",{"from":56,"to":57},"icon1","icon2",{"from":57,"to":59,"label":60},"icon3","Security incident",{"from":57,"to":62,"label":63},"icon4","Needs review",{"bullets":65},[66,69,72],{"text":67,"link":68},"TypeSafe API reference","https:\u002F\u002Fdocs.typesafe.ai\u002Fapi",{"text":70,"link":71},"AWS Step Functions Choice state","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fstate-choice.html",{"text":73,"link":74},"Call HTTPS APIs in Step Functions workflows","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fcall-https-apis.html","patterns\u002Fsfn-choice-jev-typescript-cdk",{"text":77},[78,79],"Send a clear ticket, an ambiguous ticket and a security ticket to the POST \u002Ftickets endpoint with curl, and read the Amazon SQS review queue.","See the GitHub repo for the commands and expected output.","gU83E2s2vc98rJmER0VtA3TjuW3wDTbHAykTPjVUsQc",1794652456527]