feat(bedrockprompt): add prompt management to bedrock agents #34754
+7,355
−81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue # (if applicable)
Closes #.
Reason for this change
This change adds comprehensive support for Amazon Bedrock Prompt Management to the aws-bedrock-alpha package.
Description of changes
Amazon Bedrock Prompt Management allows users to create, save, and version prompts to streamline AI workflows and ensure consistent prompt usage across different applications.
Prompt Construct : Main construct for creating and managing Bedrock prompts with support for multiple variants.
Prompt Variants: Three types of prompt variants:
TextPromptVariant
: Simple text-based prompts with variable substitutionChatPromptVariant
: Conversational prompts supporting system messages, message history, and tool configurationsAgentPromptVariant
: Prompts designed for integration with Bedrock AgentsPrompt Versioning :
PromptVersion
construct for creating immutable snapshots of promptsTool Configuration : Support for tool choice and tool specifications in chat prompts
Prompt Routing : Integration with Amazon Bedrock intelligent prompt routing for cost optimization
Describe any new or updated permissions being added
bedrock:GetPrompt
- Required to retrieve prompt details (granted viagrantGet()
method)Description of how you validated changes
Added Unit test and Integration test.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license