Deploy a prompt flow to your application using versions and aliases - Amazon Bedrock

Deploy a prompt flow to your application using versions and aliases

Note

Prompt flows is in preview and is subject to change.

When you first create a prompt flow, a working draft version (DRAFT) and a test alias (TSTALIASID) that points to the working draft version are created. When you make changes to your prompt flow, the changes apply to the working draft, and so it is the latest version of your prompt flow. You iterate on your working draft until you're satisfied with the behavior of your prompt flow. Then, you can set up your prompt flow for deployment by creating versions of your prompt flow.

A version is a snapshot that preserves the resource as it exists at the time it was created. You can continue to modify the working draft and create versions of your prompt flow as necessary. Amazon Bedrock creates versions in numerical order, starting from 1. Versions are immutable because they act as a snapshot of your prompt flow at the time you created it. To make updates to a prompt flow that you've deployed to production, you must create a new version from the working draft and make calls to the alias that points to that version.

To deploy your prompt flow, you must create an alias that points to a version of your prompt flow. Then, you make InvokeFlow requests to that alias. With aliases, you can switch efficiently between different versions of your prompt flow without keeping track of the version. For example, you can change an alias to point to a previous version of your prompt flow if there are changes that you need to revert quickly.

The following topics describe how to create versions and aliases of your prompt flow.