[{"data":1,"prerenderedAt":100},["ShallowReactive",2],{"pattern-s3-lambda-textract-bedrock-durable-cdk-ts":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":18,"extension":19,"framework":20,"gitHub":21,"highlight":6,"introBox":27,"language":37,"level":38,"meta":39,"patternArch":41,"resources":73,"s3URL":6,"services":87,"stem":93,"testing":94,"videoId":6,"__hash__":99},"patterns\u002Fpatterns\u002Fs3-lambda-textract-bedrock-durable-cdk-ts.json","Amazon S3 to AWS Lambda durable functions to Amazon Textract and Amazon Bedrock",null,{"text":8},[9],"Delete the stack: \u003Ccode>cdk destroy\u003C\u002Fcode>",[11],"content\u002Fcontributors\u002Fmarco-jahn.json",{"text":13},[14,15,16,17],"Clone the repository: \u003Ccode>git clone https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u003C\u002Fcode>","Change directory: \u003Ccode>cd s3-lambda-textract-bedrock-durable-cdk-ts\u003C\u002Fcode>","Install dependencies: \u003Ccode>npm install\u003C\u002Fcode>","Deploy the CDK stack: \u003Ccode>cdk deploy\u003C\u002Fcode>","Extract text from documents with Amazon Textract and summarize with Amazon Bedrock using an AWS Lambda durable function.","json","AWS CDK",{"template":22},{"repoURL":23,"templateURL":24,"projectFolder":25,"templateFile":26},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fs3-lambda-textract-bedrock-durable-cdk-ts","serverless-patterns\u002Fs3-lambda-textract-bedrock-durable-cdk-ts","s3-lambda-textract-bedrock-durable-cdk-ts","lib\u002Fpattern-stack.ts",{"headline":28,"text":29},"How it works",[30,31,32,33,34,35,36],"This pattern demonstrates a durable document processing pipeline using AWS Lambda durable functions.","When a document (PDF, PNG, or JPG) is uploaded to Amazon S3, it triggers a durable Lambda function.","The function starts an asynchronous Amazon Textract text detection job and polls for completion using waitForCondition with exponential backoff.","Once text extraction completes, the extracted text is sent to Amazon Bedrock (Amazon Nova Lite) for summarization.","Results including the summary are stored in Amazon DynamoDB.","Durable functions provide automatic checkpointing, so if the function is interrupted during the long-running Textract polling, it resumes from the last checkpoint without re-executing completed steps.","Example use cases: invoice processing, contract analysis, insurance document intake, and compliance review.","TypeScript","300",{"patternType":40},"Serverless",{"icon1":42,"icon2":47,"icon3":51,"icon4":56,"icon5":60,"line1":64,"line2":67,"line3":69,"line4":71},{"x":43,"y":44,"service":45,"label":46},10,50,"s3","Amazon S3",{"x":48,"y":44,"service":49,"label":50},35,"lambda","AWS Lambda (Durable)",{"x":52,"y":53,"service":54,"label":55},65,25,"textract","Amazon Textract",{"x":52,"y":57,"service":58,"label":59},75,"bedrock","Amazon Bedrock",{"x":61,"y":44,"service":62,"label":63},85,"dynamodb","Amazon DynamoDB",{"from":65,"to":66},"icon1","icon2",{"from":66,"to":68},"icon3",{"from":66,"to":70},"icon4",{"from":66,"to":72},"icon5",{"bullets":74},[75,78,81,84],{"text":76,"link":77},"AWS Lambda Durable Functions Documentation","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fdurable-functions.html",{"text":79,"link":80},"Amazon Textract Asynchronous Operations","https:\u002F\u002Fdocs.aws.amazon.com\u002Ftextract\u002Flatest\u002Fdg\u002Fasync.html",{"text":82,"link":83},"Amazon Bedrock Amazon Nova Models","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock\u002Flatest\u002Fuserguide\u002Fmodel-parameters-nova.html",{"text":85,"link":86},"AWS Lambda Durable Execution SDK for JavaScript","https:\u002F\u002Fgithub.com\u002Faws\u002Faws-durable-execution-sdk-js",{"from":88,"to":90},{"serviceName":46,"serviceURL":89},"\u002Fs3\u002F",{"serviceName":91,"serviceURL":92},"AWS Lambda","\u002Flambda\u002F","patterns\u002Fs3-lambda-textract-bedrock-durable-cdk-ts",{"text":95},[96,97,98],"Get the S3 bucket name: \u003Ccode>BUCKET_NAME=$(aws cloudformation describe-stacks --stack-name S3LambdaTextractBedrockDurableStack --query 'Stacks[0].Outputs[?OutputKey==`DocumentBucketName`].OutputValue' --output text)\u003C\u002Fcode>","Upload a test document: \u003Ccode>aws s3 cp test-document.pdf s3:\u002F\u002F$BUCKET_NAME\u002F\u003C\u002Fcode>","Check DynamoDB for results: \u003Ccode>TABLE_NAME=$(aws cloudformation describe-stacks --stack-name S3LambdaTextractBedrockDurableStack --query 'Stacks[0].Outputs[?OutputKey==`ResultsTableName`].OutputValue' --output text) && aws dynamodb scan --table-name $TABLE_NAME\u003C\u002Fcode>","hsi1HRTdH4PJ4T_H1TbmT7gMRT4P1OFySpCewVKE44w",1778846887494]