Skip to content

Pattern submission: bedrock-prompt-management-lambda-sam #3294

Description

@manishh-13

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

Pull request: #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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions