AWS::Bedrock::Flow
Creates a prompt flow that you can use to send an input through various steps to yield an output. You define a flow by configuring nodes, each of which corresponds to a step of the flow, and creating connections between the nodes to create paths to different outputs. You can define the flow in one of the following ways:
-
Define a FlowDefinition in the
Definition
property. -
Provide the definition in the
DefinitionString
property as a JSON-formatted string matching the FlowDefinition property. -
Provide an Amazon S3 location in the
DefinitionS3Location
property that matches the FlowDefinition.
If you use the DefinitionString
or DefinitionS3Location
property, you can use the DefinitionSubstitutions
property to define key-value pairs to replace at runtime.
For more information, see How it works and Create a prompt flow in Amazon Bedrock in the Amazon Bedrock User Guide.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Bedrock::Flow", "Properties" : { "CustomerEncryptionKeyArn" :
String
, "Definition" :FlowDefinition
, "DefinitionS3Location" :S3Location
, "DefinitionString" :String
, "DefinitionSubstitutions" :{
, "Description" :Key
:Value
, ...}String
, "ExecutionRoleArn" :String
, "Name" :String
, "Tags" :{
, "TestAliasTags" :Key
:Value
, ...}{
} }Key
:Value
, ...}
YAML
Type: AWS::Bedrock::Flow Properties: CustomerEncryptionKeyArn:
String
Definition:FlowDefinition
DefinitionS3Location:S3Location
DefinitionString:String
DefinitionSubstitutions:Description:
Key
:Value
String
ExecutionRoleArn:String
Name:String
Tags:TestAliasTags:
Key
:Value
Key
:Value
Properties
CustomerEncryptionKeyArn
-
The Amazon Resource Name (ARN) of the KMS key that the flow is encrypted with.
Required: No
Type: String
Pattern:
^arn:aws(|-cn|-us-gov):kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}$
Minimum:
1
Maximum:
2048
Update requires: No interruption
Definition
-
The definition of the nodes and connections between the nodes in the flow.
Required: No
Type: FlowDefinition
Update requires: No interruption
DefinitionS3Location
-
The Amazon S3 location of the flow definition.
Required: No
Type: S3Location
Update requires: No interruption
DefinitionString
-
The definition of the flow as a JSON-formatted string. The string must match the format in FlowDefinition.
Required: No
Type: String
Maximum:
512000
Update requires: No interruption
DefinitionSubstitutions
-
A map that specifies the mappings for placeholder variables in the prompt flow definition. This enables the customer to inject values obtained at runtime. Variables can be template parameter names, resource logical IDs, resource attributes, or a variable in a key-value map. Only supported with the
DefinitionString
andDefinitionS3Location
fields.Substitutions must follow the syntax:
${key_name}
or${variable_1,variable_2,...}
.Required: No
Type: Object
Update requires: No interruption
Description
-
A description of the flow.
Required: No
Type: String
Minimum:
1
Maximum:
200
Update requires: No interruption
ExecutionRoleArn
-
The Amazon Resource Name (ARN) of the service role with permissions to create a flow. For more information, see Create a service row for flows in the Amazon Bedrock User Guide.
Required: Yes
Type: String
Pattern:
^arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/(service-role/)?.+$
Maximum:
2048
Update requires: No interruption
Name
-
The name of the flow.
Required: Yes
Type: String
Pattern:
^([0-9a-zA-Z][_-]?){1,100}$
Update requires: No interruption
-
Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
Required: No
Type: Object of String
Pattern:
^[a-zA-Z0-9\s._:/=+@-]*$
Minimum:
0
Maximum:
256
Update requires: No interruption
Property description not available.
Required: No
Type: Object of String
Pattern:
^[a-zA-Z0-9\s._:/=+@-]*$
Minimum:
0
Maximum:
256
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the Amazon Resource Number (ARN) of the flow.
For example, { "Ref": "myFlow" }
could return the value ""arn:aws:bedrock:us-east-1:123456789012:flow/FLOW123456""
.
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
Arn
-
The Amazon Resource Name (ARN) of the flow.
CreatedAt
-
The time at which the flow was created.
Id
-
The unique identifier of the flow.
Status
-
The status of the flow. The following statuses are possible:
-
NotPrepared – The flow has been created or updated, but hasn't been prepared. If you just created the flow, you can't test it. If you updated the flow, the
DRAFT
version won't contain the latest changes for testing. Send a PrepareFlow request to package the latest changes into theDRAFT
version. -
Preparing – The flow is being prepared so that the
DRAFT
version contains the latest changes for testing. -
Prepared – The flow is prepared and the
DRAFT
version contains the latest changes for testing. -
Failed – The last API operation that you invoked on the flow failed. Send a GetFlow request and check the error message in the
validations
field.
-
UpdatedAt
-
The time at which the flow was last updated.
Validations
Property description not available.
Version
-
The latest version of the flow.