Skip to content
GitHubXDiscordRSS

PromptVersion

Learn how to create, update, and manage AWS Bedrock PromptVersions using Alchemy Cloud Control.

The PromptVersion resource allows you to create and manage AWS Bedrock PromptVersions which are used for versioning prompts in your AI applications.

Create a basic PromptVersion with required properties and an optional description.

import AWS from "alchemy/aws/control";
const promptVersion = await AWS.Bedrock.PromptVersion("myPromptVersion", {
PromptArn: "arn:aws:bedrock:us-west-2:123456789012:prompt/my-prompt",
Description: "Initial version of my AI prompt."
});

Configure a PromptVersion with tags for better management and organization.

const taggedPromptVersion = await AWS.Bedrock.PromptVersion("myTaggedPromptVersion", {
PromptArn: "arn:aws:bedrock:us-west-2:123456789012:prompt/my-prompt",
Description: "Version 1 of my prompt with tags.",
Tags: {
Environment: "Production",
Team: "AI Development"
}
});

Create a PromptVersion that adopts an existing resource instead of failing.

const adoptExistingPromptVersion = await AWS.Bedrock.PromptVersion("myAdoptedPromptVersion", {
PromptArn: "arn:aws:bedrock:us-west-2:123456789012:prompt/my-existing-prompt",
Description: "Adopted version of an existing prompt.",
adopt: true
});

You can also update an existing PromptVersion by using the same ID and modifying the properties.

const updatedPromptVersion = await AWS.Bedrock.PromptVersion("myPromptVersion", {
PromptArn: "arn:aws:bedrock:us-west-2:123456789012:prompt/my-prompt",
Description: "Updated version of my AI prompt with new features."
});