

# Deploy a flow to your application using versions and aliases
<a name="flows-deploy"></a>

When you first create a 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 flow, the changes apply to the working draft, and so it is the latest version of your flow. You iterate on your working draft until you're satisfied with the behavior of your flow. Then, you can set up your flow for deployment by creating *versions* of your 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 flow as necessary. Amazon Bedrock creates versions in numerical order, starting from 1. Versions are immutable because they act as a snapshot of your flow at the time you created it. To make updates to a 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 flow, you must create an *alias* that points to a version of your flow. Then, you make `InvokeFlow` requests to that alias. With aliases, you can switch efficiently between different versions of your flow without keeping track of the version. For example, you can change an alias to point to a previous version of your flow if there are changes that you need to revert quickly.

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

**Topics**
+ [

# Create a version of a flow in Amazon Bedrock
](flows-version-create.md)
+ [

# View information about versions of flows in Amazon Bedrock
](flows-version-view.md)
+ [

# Delete a version of a flow in Amazon Bedrock
](flows-version-delete.md)
+ [

# Create an alias of a flow in Amazon Bedrock
](flows-alias-create.md)
+ [

# View information about aliases of flows in Amazon Bedrock
](flows-alias-view.md)
+ [

# Modify an alias of a flow in Amazon Bedrock
](flows-alias-modify.md)
+ [

# Delete an alias of a flow in Amazon Bedrock
](flows-alias-delete.md)

# Create a version of a flow in Amazon Bedrock
<a name="flows-version-create"></a>

When you're satisfied with the configuration of your flow, create a immutable version of the flow that you can point to with an alias. To learn how to create a version of your flow, Choose the tab for your preferred method, and then follow the steps:

------
#### [ Console ]

**To create a version of your Amazon Bedrock Flows**

1. Sign in to the AWS Management Console with an IAM identity that has permissions to use the Amazon Bedrock console. Then, open the Amazon Bedrock console at [https://console.aws.amazon.com/bedrock](https://console.aws.amazon.com/bedrock).

1. Select **Amazon Bedrock Flows** from the left navigation pane. Then, choose a flow in the **Amazon Bedrock Flows** section.

1. In the **Versions** section, choose **Publish version**.

1. After the version is published, a success banner appears at the top.

------
#### [ API ]

To create a version of your flow, send a [CreateFlowVersion](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateFlowVersion.html) request with an [Agents for Amazon Bedrock build-time endpoint](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#bra-bt) and specify the ARN or ID of the flow as the `flowIdentifier`.

The response returns an ID and ARN for the version. Versions are created incrementally, starting from 1.

------

# View information about versions of flows in Amazon Bedrock
<a name="flows-version-view"></a>

To learn how to view information about the versions of a flow, choose the tab for your preferred method, and then follow the steps:

------
#### [ Console ]

**To view information about a version of a flow**

1. Open the [AWS Management Console](https://console.aws.amazon.com) and sign in to your account. Navigate to Amazon Bedrock.

1. Select **Flows** from the left navigation pane. Then, in the **Flows** section, select a flow you want to view.

1. Choose the version to view from the **Versions** section.

1. To view details about the nodes and configurations attached to version of the flow, select the node and view the details in the **Flow builder** pane. To make modifications to the flow, use the working draft and create a new version.

------
#### [ API ]

To get information about a version of your flow, send a [GetFlowVersion](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_GetFlowVersion.html) request with an [Agents for Amazon Bedrock build-time endpoint](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#bra-bt) and specify the ARN or ID of the flow as the `flowIdentifier`. In the `flowVersion` field, specify the version number.

To list information for all versions of a flow, send a [ListFlowVersions](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_ListFlowVersions.html) request with an [Agents for Amazon Bedrock build-time endpoint](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#bra-bt) and specify the ARN or ID of the flow as the `flowIdentifier`. You can specify the following optional parameters:


****  

| Field | Short description | 
| --- | --- | 
| maxResults | The maximum number of results to return in a response. | 
| nextToken | If there are more results than the number you specified in the maxResults field, the response returns a nextToken value. To see the next batch of results, send the nextToken value in another request. | 

------

# Delete a version of a flow in Amazon Bedrock
<a name="flows-version-delete"></a>

To learn how to delete a version of a flow, choose the tab for your preferred method, and then follow the steps:

------
#### [ Console ]

**To delete a version of a flow**

1. Open the [AWS Management Console](https://console.aws.amazon.com) and sign in to your account. Navigate to Amazon Bedrock.

1. Select **Flows** from the left navigation pane. Then, in the **Flows** section, select a flow.

1. Choose **Delete**.

1. A dialog box appears warning you about the consequences of deletion. To confirm that you want to delete the version, enter **delete** in the input field and choose **Delete**.

1. A banner appears to inform you that the version is being deleted. When deletion is complete, a success banner appears.

------
#### [ API ]

To delete a version of a flow, send a [DeleteFlowVersion](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_DeleteFlowVersion.html) request with an [Agents for Amazon Bedrock build-time endpoint](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#bra-bt). Specify the ARN or ID of the flow in the `flowIdentifier` field and the version to delete in the `flowVersion` field.

------

# Create an alias of a flow in Amazon Bedrock
<a name="flows-alias-create"></a>

To invoke a flow, you must first create an alias that points to a version of the flow. To learn how to create an alias, choose the tab for your preferred method, and then follow the steps:

------
#### [ Console ]

**To create an alias for your Amazon Bedrock Flows**

1. Sign in to the AWS Management Console with an IAM identity that has permissions to use the Amazon Bedrock console. Then, open the Amazon Bedrock console at [https://console.aws.amazon.com/bedrock](https://console.aws.amazon.com/bedrock).

1. Select **Amazon Bedrock Flows** from the left navigation pane. Then, choose a flow in the **Flows** section.

1. In the **Aliases** section, choose **Create alias**.

1. Enter a unique name for the alias and provide an optional description.

1. Choose one of the following options:
   + To create a new version, choose **Create a new version and to associate it to this alias**.
   + To use an existing version, choose **Use an existing version to associate this alias**. From the dropdown menu, choose the version that you want to associate the alias to.

1. Select **Create alias**. A success banner appears at the top.

------
#### [ API ]

To create an alias to point to a version of your flow, send a [CreateFlowAlias](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateFlowAlias.html) request with an [Agents for Amazon Bedrock build-time endpoint](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#bra-bt).

The following fields are required:


****  

| Field | Basic description | 
| --- | --- | 
| flowIdentifier | The ARN or ID of the flow for which to create an alias. | 
| name | A name for the alias. | 
| routingConfiguration | Specify the version to map the alias to in the flowVersion field. | 

The following fields are optional:


****  

| Field | Use-case | 
| --- | --- | 
| description | To provide a description for the alias. | 
| clientToken | To prevent reduplication of the request. | 

------

Creation of an alias produces a resource with an identifier and an Amazon Resource Name (ARN) that you can specify when you invoke a flow from your application. To learn how to invoke a flow, see [Test a flow in Amazon Bedrock](flows-test.md).

# View information about aliases of flows in Amazon Bedrock
<a name="flows-alias-view"></a>

To learn how to view information about the aliases of a flow, choose the tab for your preferred method, and then follow the steps:

------
#### [ Console ]

**To view the details of an alias**

1. Open the [AWS Management Console](https://console.aws.amazon.com) and sign in to your account. Navigate to Amazon Bedrock.

1. Select **Flows** from the left navigation pane. Then, in the **Flows** section, select a flow.

1. Choose the alias to view from the **Aliases** section.

1. You can view the name and description of the alias and tags that are associated with the alias.

------
#### [ API ]

To get information about an alias of your flow, send a [GetFlowAlias](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_GetFlowAlias.html) request with an [Agents for Amazon Bedrock build-time endpoint](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#bra-bt) and specify the ARN or ID of the flow as the `flowIdentifier`. In the `aliasIdentifier` field, specify the ID or ARN of the alias.

To list information for all aliases of a flow, send a [ListFlowAliass](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_ListFlowAliass.html) request with an [Agents for Amazon Bedrock build-time endpoint](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#bra-bt) and specify the ARN or ID of the flow as the `flowIdentifier`. You can specify the following optional parameters:


****  

| Field | Short description | 
| --- | --- | 
| maxResults | The maximum number of results to return in a response. | 
| nextToken | If there are more results than the number you specified in the maxResults field, the response returns a nextToken value. To see the next batch of results, send the nextToken value in another request. | 

------

# Modify an alias of a flow in Amazon Bedrock
<a name="flows-alias-modify"></a>

To learn how to modify an alias of a flow, choose the tab for your preferred method, and then follow the steps:

------
#### [ Console ]

**To modify an alias**

1. Open the [AWS Management Console](https://console.aws.amazon.com) and sign in to your account. Navigate to Amazon Bedrock.

1. Select **Flows** from the left navigation pane. Then, in the **Flows** section, select a flow.

1. In the **Aliases** section, choose the option button next to the alias that you want to edit.

1. You can edit the name and description of the alias. Additionally, you can perform one of the following actions:
   + To create a new version and associate this alias with that version, choose **Create a new version and associate it to this alias**.
   + To associate this alias with a different existing version, choose **Use an existing version and associate this alias**.

1. Select **Save**.

------
#### [ API ]

To update an alias, send an [UpdateFlowAlias](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateFlowAlias.html) request with an [Agents for Amazon Bedrock build-time endpoint](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#bra-bt). Include both fields you want to maintain and fields that you want to change in the request.

------

# Delete an alias of a flow in Amazon Bedrock
<a name="flows-alias-delete"></a>

To learn how to delete an alias of flow, choose the tab for your preferred method, and then follow the steps:

------
#### [ Console ]

**To delete an alias**

1. Open the [AWS Management Console](https://console.aws.amazon.com) and sign in to your account. Navigate to Amazon Bedrock.

1. Select **Flows** from the left navigation pane. Then, in the **Flows** section, select a flow.

1. To choose the alias for deletion, in the **Aliases** section, choose the option button next to the alias that you want to delete.

1. Choose **Delete**.

1. A dialog box appears warning you about the consequences of deletion. To confirm that you want to delete the alias, enter **delete** in the input field and choose **Delete**.

1. A banner appears to inform you that the alias is being deleted. When deletion is complete, a success banner appears.

------
#### [ API ]

To delete a flow alias, send a [DeleteFlowAlias](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_DeleteFlowAlias.html) request with an [Agents for Amazon Bedrock build-time endpoint](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#bra-bt). Specify the ARN or ID of the flow in the `flowIdentifier` field and the ARN or ID of the alias to delete in the `aliasIdentifier` field.

------