[{"data":1,"prerenderedAt":78},["ShallowReactive",2],{"pattern-sfn-s3vectors-rag-refresh-cdk":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":17,"extension":18,"framework":19,"gitHub":20,"highlight":6,"introBox":26,"language":32,"level":33,"meta":34,"patternArch":35,"resources":59,"s3URL":6,"services":6,"stem":73,"testing":74,"videoId":6,"__hash__":77},"patterns\u002Fpatterns\u002Fsfn-s3vectors-rag-refresh-cdk.json","Knowledge base refresh pipeline with AWS Step Functions & Amazon S3 Vectors",null,{"text":8},[9],"Delete the stack: \u003Ccode>cdk destroy\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fben-freiberg.json",{"text":13},[14,15,16],"npm install","cd lambda && npm install && cd ..","cdk deploy","Automate ingestion of new documents into an Amazon S3 Vectors knowledge base using AWS Step Functions Distributed Map with validation","json","AWS CDK",{"template":21},{"repoURL":22,"templateURL":23,"projectFolder":24,"templateFile":25},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fsfn-s3vectors-rag-refresh-cdk","serverless-patterns\u002Fsfn-s3vectors-rag-refresh-cdk","sfn-s3vectors-rag-refresh-cdk","lib\u002Frag-refresh-stack.ts",{"headline":27,"text":28},"How it works",[29,30,31],"When new documents land in an S3 bucket, a Step Functions workflow fans out via Distributed Map to process each document in parallel.","For each document, a Lambda function reads the content, generates vector embeddings using Amazon Bedrock, and stores them with PutVectors in the S3 Vectors vector bucket.","After ingestion completes, a validation step uses QueryVectors to confirm the new content is searchable. A Choice state either confirms success or rolls back by deleting the newly added vectors if validation fails.","TypeScript","300",{},{"icon1":36,"icon2":41,"icon3":45,"icon4":49,"line1":52,"line2":55,"line3":57},{"x":37,"y":38,"service":39,"label":40},10,50,"s3","Amazon S3",{"x":42,"y":38,"service":43,"label":44},35,"sfn","AWS Step Functions",{"x":46,"y":38,"service":47,"label":48},60,"lambda","AWS Lambda",{"x":50,"y":38,"service":39,"label":51},85,"Amazon S3 Vectors",{"from":53,"to":54},"icon1","icon2",{"from":54,"to":56},"icon3",{"from":56,"to":58},"icon4",{"bullets":60},[61,64,67,70],{"text":62,"link":63},"Amazon S3 Vectors documentation","https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonS3\u002Flatest\u002Fuserguide\u002Fvectors.html",{"text":65,"link":66},"AWS Step Functions Distributed Map","https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fconcepts-asl-use-map-state-distributed.html",{"text":68,"link":69},"Amazon Bedrock Embeddings","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock\u002Flatest\u002Fuserguide\u002Fembeddings.html",{"text":71,"link":72},"AWS CDK Developer Guide","https:\u002F\u002Fdocs.aws.amazon.com\u002Fcdk\u002Flatest\u002Fguide\u002F","patterns\u002Fsfn-s3vectors-rag-refresh-cdk",{"text":75},[76],"See the GitHub repo for detailed testing instructions.","juR6j9gvmSEHH4EqZl0RigrIyYL95zXz9XRwuQWwvOs",1782210919655]