[{"data":1,"prerenderedAt":71},["ShallowReactive",2],{"pattern-apigw-lambda-opensearach-serverless-nextgen":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":16,"extension":17,"framework":18,"gitHub":19,"highlight":6,"introBox":25,"language":32,"level":33,"meta":34,"patternArch":35,"resources":53,"s3URL":6,"services":6,"stem":66,"testing":67,"videoId":6,"__hash__":70},"patterns\u002Fpatterns\u002Fapigw-lambda-opensearach-serverless-nextgen.json","Amazon API Gateway to AWS Lambda to Amazon OpenSearch Serverless NextGen",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete --stack-name STACK_NAME\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fpete-davis.json",{"text":13},[14,15],"sam build","sam deploy --guided","Deploy a serverless semantic search API with zero baseline compute cost using Lambda and OpenSearch Serverless NextGen (scale-to-zero).","json","AWS SAM",{"template":20},{"repoURL":21,"templateURL":22,"projectFolder":23,"templateFile":24},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fapigw-lambda-opensearch-serverless-nextgen","serverless-patterns\u002Fapigw-lambda-opensearch-serverless-nextgen","apigw-lambda-opensearch-serverless-nextgen","template.yaml",{"headline":26,"text":27},"How it works",[28,29,30,31],"This pattern deploys an Amazon API Gateway REST API backed by three AWS Lambda functions that perform semantic, lexical, and hybrid search against an Amazon OpenSearch Serverless NextGen collection.","Amazon OpenSearch Serverless NextGen scales compute to zero when idle and provisions in approximately 10 seconds when traffic arrives. Combined with Lambda's own scale-to-zero, the entire stack incurs zero compute cost when not in use.","Embeddings are generated server-side by an OpenSearch ML model connected to Amazon Bedrock (Amazon Titan Text Embeddings V2) — Lambda functions send and receive plain text only.","A hybrid search pipeline applies min-max score normalization to combine BM25 (lexical) and k-NN (semantic) results with configurable weights.","Python","300",{},{"icon1":36,"icon2":41,"icon3":44,"line1":48,"line2":51},{"x":37,"y":38,"service":39,"label":40},20,50,"apigw","Amazon API Gateway",{"x":38,"y":38,"service":42,"label":43},"lambda","AWS Lambda",{"x":45,"y":38,"service":46,"label":47},80,"opensearch","Amazon OpenSearch Serverless",{"from":49,"to":50},"icon1","icon2",{"from":50,"to":52},"icon3",{"bullets":54},[55,58,60,63],{"text":56,"link":57},"Introducing the next generation of Amazon OpenSearch Serverless","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Faws\u002Fintroducing-the-next-generation-of-amazon-opensearch-serverless-for-building-your-agentic-ai-applications\u002F",{"text":47,"link":59},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fopensearch-service\u002Flatest\u002Fdeveloperguide\u002Fserverless.html",{"text":61,"link":62},"OpenSearch neural search","https:\u002F\u002Fopensearch.org\u002Fdocs\u002Flatest\u002Fsearch-plugins\u002Fneural-search\u002F",{"text":64,"link":65},"Amazon Titan Text Embeddings V2","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock\u002Flatest\u002Fuserguide\u002Ftitan-embedding-models.html","patterns\u002Fapigw-lambda-opensearach-serverless-nextgen",{"text":68},[69],"See the GitHub repo for detailed testing instructions.","pIgHQcpEdl6w034xBUN1zORPZTr6utqPInh_342Re-0",1784543717852]