aws-samples / aws-samples/serverless-patterns

New pattern submission - bedrock-prompt-management-lambda-sam

Open
#3,294 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.8k
Forks
1.1k
Avg merge
7d 14h
Merged PRs (30d)
6

Description

**Pattern name:** bedrock-prompt-management-lambda-sam

**Pull request:** https://github.com/aws-samples/serverless-patterns/pull/3293

**Description:**

Manage and version GenAI prompts with Amazon Bedrock Prompt Management. This pattern defines an Amazon Bedrock managed prompt and a published version as native CloudFormation resources (`AWS::Bedrock::Prompt` and `AWS::Bedrock::PromptVersion`), and invokes the prompt from AWS Lambda through the Bedrock Converse API. The prompt text lives in Bedrock rather than in the function, so the prompt can be updated or rolled back by publishing a new version and repointing the function, with no function code change.

**Services used:** Amazon Bedrock (Prompt Management, Converse API), AWS Lambda.

**Language:** Python 3.13
**Framework:** AWS SAM
**Level:** 200

Tested end to end in a live account: deployed with `sam build` and `sam deploy`, invoked the function to summarize input via the managed prompt, then published a new prompt version and repointed the function to confirm the output changes with no code change.

Contributor guide

Open the contributing guide

Research direction

Start with the linked pull request https://github.com/aws-samples/serverless-patterns/pull/3293 and review its AWS SAM pattern files. Run `sam build` and `sam deploy`, then invoke the Lambda and verify that publishing a new Bedrock prompt version changes the output without changing function code.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
ai, backend, cloud
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.