[{"data":1,"prerenderedAt":93},["ShallowReactive",2],{"pattern-sfn-sagemaker-sqs-sns-typescript-cdk":3,"pattern-group-sfn-sagemaker-sqs-sns-typescript-cdk":92},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":11,"deploy":13,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":24,"language":30,"level":31,"meta":32,"patternArch":33,"patternGroup":6,"patternGroupLabel":6,"resources":72,"stem":86,"testing":87,"videoId":6,"__hash__":91},"patterns\u002Fpatterns\u002Fsfn-sagemaker-sqs-sns-typescript-cdk.json","AWS Step Functions to Amazon SageMaker AI confidence gate",null,{"text":8},[9,10],"Delete the stack: \u003Ccode>npx cdk destroy\u003C\u002Fcode>.","Delete the endpoint log group that Amazon SageMaker AI creates: \u003Ccode>aws logs delete-log-group --log-group-name \u002Faws\u002Fsagemaker\u002FEndpoints\u002F$ENDPOINT\u003C\u002Fcode>. Read \u003Ccode>$ENDPOINT\u003C\u002Fcode> from the \u003Ccode>DeciderEndpointName\u003C\u002Fcode> stack output before you delete the stack.",[12],"content\u002Fcontributors\u002Fnithin-chandran-r.json",{"text":14},[15,16],"npm install","npx cdk deploy","An AWS Step Functions Choice state acts on the answers of an open-weight Strands Decider model on Amazon SageMaker AI only when it is confident; the rest go to Amazon SQS.","json","AWS CDK",{"template":21},{"patternPath":22,"templateFile":23},"sfn-sagemaker-sqs-sns\u002Ftypescript\u002Fcdk","lib\u002Fstrands-decider-confidence-gated-triage-stack.ts",{"headline":25,"text":26},"How it works",[27,28,29],"This pattern deploys an AWS Step Functions Express workflow that calls an Amazon SageMaker AI endpoint serving the open-weight Strands Decider decision model, directly through the AWS SDK integration. The model 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 confident department answer is auto-routed. 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 model call failed or returned something unusable, goes to an Amazon SQS human-review queue with a dead-letter queue behind it.","The stack builds the model container image, so you need a container builder (Docker, or Finch with `CDK_DOCKER=finch`), and the account and Region must be bootstrapped with `npx cdk bootstrap`.","TypeScript","300",{},{"group1":34,"icon1":40,"icon2":44,"icon3":48,"icon4":52,"icon5":57,"line1":61,"line2":64,"line3":66,"line4":69},{"x":35,"y":36,"w":37,"h":38,"label":39},20,12,50,78,"AWS Step Functions Express workflow",{"x":41,"y":37,"service":42,"label":43},8,"icon-internet","Ticket",{"x":45,"y":37,"service":46,"label":47},33,"sagemaker","Amazon\nSageMaker AI",{"x":49,"y":37,"service":50,"label":51},58,"sfn","Choice state",{"x":53,"y":54,"service":55,"label":56},87,30,"sns","Amazon SNS",{"x":53,"y":58,"service":59,"label":60},70,"sqs","Amazon SQS",{"from":62,"to":63},"icon1","icon2",{"from":63,"to":65},"icon3",{"from":65,"to":67,"label":68},"icon4","security",{"from":65,"to":70,"label":71},"icon5","review",{"bullets":73},[74,77,80,83],{"text":75,"link":76},"Strands Decider","https:\u002F\u002Fgithub.com\u002Fstrands-labs\u002Fstrands-decider",{"text":78,"link":79},"AWS Step Functions Choice state","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fstate-choice.html",{"text":81,"link":82},"Call AWS services with Step Functions AWS SDK integrations","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fsupported-services-awssdk.html",{"text":84,"link":85},"Custom inference containers for Amazon SageMaker AI","https:\u002F\u002Fdocs.aws.amazon.com\u002Fsagemaker\u002Flatest\u002Fdg\u002Fyour-algorithms-inference-code.html","patterns\u002Fsfn-sagemaker-sqs-sns-typescript-cdk",{"text":88},[89,90],"Run the three sample tickets in the `events` folder: a clear one is auto-routed, an ambiguous one goes to the Amazon SQS review queue, and a security one also sends a page to Amazon SNS.","See the GitHub repo for the commands and expected output.","r7_uP5wRe0koigB_vKTXYxeSOfkJxZRKDK6VUorERFA",[],1794479670841]