[{"data":1,"prerenderedAt":100},["ShallowReactive",2],{"pattern-apigw-lambda-bedrock-code-interpreter-typescript-cdk":3,"pattern-group-apigw-lambda-bedrock-code-interpreter-typescript-cdk":74},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":24,"language":31,"level":32,"meta":33,"patternArch":34,"patternGroup":60,"patternGroupLabel":6,"resources":61,"stem":69,"testing":70,"videoId":6,"__hash__":73},"patterns\u002Fpatterns\u002Fapigw-lambda-bedrock-code-interpreter-typescript-cdk.json","AI data analyst with Amazon Bedrock and Amazon Bedrock AgentCore Code Interpreter",null,{"text":8},[9],"\u003Ccode>npx cdk destroy\u003C\u002Fcode>",[11],"content\u002Fcontributors\u002Fnithin-chandran-r.json",{"text":13},[14,15,16],"\u003Ccode>npm install\u003C\u002Fcode>","\u003Ccode>npm run build\u003C\u002Fcode>","\u003Ccode>npx cdk deploy\u003C\u002Fcode>","Amazon API Gateway + AWS Lambda + Amazon Bedrock generates Python code from questions, Amazon Bedrock AgentCore Code Interpreter executes it safely.","json","AWS CDK",{"template":21},{"patternPath":22,"templateFile":23},"apigw-lambda-bedrock-code-interpreter\u002Ftypescript\u002Fcdk","lib\u002Fapigw-lambda-bedrock-code-interpreter-stack.ts",{"headline":25,"text":26},"How it works",[27,28,29,30],"A user submits a data analysis question in natural language via the Amazon API Gateway REST API.","The AWS Lambda function sends the question to Amazon Bedrock, which generates Python code to answer it.","The generated code is executed in Amazon Bedrock AgentCore Code Interpreter — a sandboxed environment with no access to the host system.","Results are returned to the user along with the generated code for transparency.","TypeScript","300",{},{"icon1":35,"icon2":40,"icon3":44,"icon4":49,"line1":53,"line2":56,"line3":58},{"x":36,"y":37,"service":38,"label":39},15,50,"apigw","Amazon API Gateway",{"x":41,"y":37,"service":42,"label":43},45,"lambda-event-functions","AWS Lambda",{"x":45,"y":46,"service":47,"label":48},80,30,"bedrock","Amazon Bedrock",{"x":45,"y":50,"service":51,"label":52},70,"bedrock-agentcore","Amazon Bedrock Code Interpreter",{"from":54,"to":55},"icon1","icon2",{"from":55,"to":57},"icon3",{"from":55,"to":59},"icon4","apigw-lambda-bedrock-code-interpreter",{"bullets":62},[63,66],{"text":64,"link":65},"Amazon Bedrock AgentCore Code Interpreter documentation","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock-agentcore\u002Flatest\u002Fdevguide\u002Fcode-interpreter.html",{"text":67,"link":68},"Amazon Bedrock InvokeModel API","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock\u002Flatest\u002FAPIReference\u002FAPI_runtime_InvokeModel.html","patterns\u002Fapigw-lambda-bedrock-code-interpreter-typescript-cdk",{"text":71},[72],"See the GitHub repo for detailed testing instructions.","7N7nNlmMxlsB1rtlJin137h6o5LUbO_2pSXJLMWUAMI",[75],{"id":4,"title":5,"architectureURL":6,"cleanup":76,"contributors":78,"deploy":79,"description":17,"extension":18,"framework":19,"gitHub":81,"highlight":6,"introBox":83,"language":31,"level":32,"meta":85,"patternArch":86,"patternGroup":60,"patternGroupLabel":6,"resources":94,"stem":69,"testing":98,"videoId":6,"__hash__":73},{"text":77},[9],[11],{"text":80},[14,15,16],{"template":82},{"patternPath":22,"templateFile":23},{"headline":25,"text":84},[27,28,29,30],{},{"icon1":87,"icon2":88,"icon3":89,"icon4":90,"line1":91,"line2":92,"line3":93},{"x":36,"y":37,"service":38,"label":39},{"x":41,"y":37,"service":42,"label":43},{"x":45,"y":46,"service":47,"label":48},{"x":45,"y":50,"service":51,"label":52},{"from":54,"to":55},{"from":55,"to":57},{"from":55,"to":59},{"bullets":95},[96,97],{"text":64,"link":65},{"text":67,"link":68},{"text":99},[72],1792492479360]