To submit a template to the Serverless Patterns Collection, per the simplified process all pattern metadata (description, language, level, framework, intro, resources, deploy/test/cleanup, author) is provided in the example-pattern.json file included in the PR.
Pattern: bedrock-semantic-cache-s3vectors-sam
Summary: Serverless semantic cache for Amazon Bedrock using AWS Lambda and Amazon S3 Vectors. Lambda embeds the incoming prompt (Titan Text Embeddings v2), queries an S3 Vectors index by cosine similarity, and returns a cached answer on a semantic hit (threshold + freshness TTL + SSM epoch force-invalidation + negation-parity guard), skipping the Bedrock LLM call. On a miss it calls Bedrock, stores the embedding + answer in vector metadata, and returns the fresh result. Fully serverless (S3 Vectors scales to zero; Lambda is stateless).
Language: Python
Framework: AWS SAM
Level: 300 (Advanced)
GitHub PR for template:
#3262
To submit a template to the Serverless Patterns Collection, per the simplified process all pattern metadata (description, language, level, framework, intro, resources, deploy/test/cleanup, author) is provided in the
example-pattern.jsonfile included in the PR.Pattern: bedrock-semantic-cache-s3vectors-sam
Summary: Serverless semantic cache for Amazon Bedrock using AWS Lambda and Amazon S3 Vectors. Lambda embeds the incoming prompt (Titan Text Embeddings v2), queries an S3 Vectors index by cosine similarity, and returns a cached answer on a semantic hit (threshold + freshness TTL + SSM epoch force-invalidation + negation-parity guard), skipping the Bedrock LLM call. On a miss it calls Bedrock, stores the embedding + answer in vector metadata, and returns the fresh result. Fully serverless (S3 Vectors scales to zero; Lambda is stateless).
Language: Python
Framework: AWS SAM
Level: 300 (Advanced)
GitHub PR for template:
#3262