AWS::Bedrock::FlowCreates 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowdefinition.html) in the `Definition` property. - Provide the definition in the `DefinitionString` property as a JSON-formatted string matching the [FlowDefinition](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowdefinition.html) property. - Provide an Amazon S3 location in the `DefinitionS3Location` property that matches the [FlowDefinition](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowdefinition.html) . 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](https://docs.aws.amazon.com/bedrock/latest/userguide/flows-how-it-works.html) and [Create a prompt flow in Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/flows-create.html) in the Amazon Bedrock User Guide.
import { CfnFlow } from 'aws-cdk-lib/aws-bedrock';Or use the module namespace:
import * as bedrock from 'aws-cdk-lib/aws-bedrock';
// bedrock.CfnFlowConfiguration passed to the constructor as CfnFlowProps.
executionRoleArnRequiredstringThe Amazon Resource Name (ARN) of the service role with permissions to create a flow. For more information, see [Create a service row for flows](https://docs.aws.amazon.com/bedrock/latest/userguide/flows-permissions.html) in the Amazon Bedrock User Guide.
nameRequiredstringThe name of the flow.
customerEncryptionKeyArnOptionalstringThe Amazon Resource Name (ARN) of the KMS key that the flow is encrypted with.
definitionOptionalIResolvable | FlowDefinitionPropertyThe definition of the nodes and connections between the nodes in the flow.
definitionS3LocationOptionalIResolvable | S3LocationPropertyThe Amazon S3 location of the flow definition.
definitionStringOptionalstringThe definition of the flow as a JSON-formatted string. The string must match the format in [FlowDefinition](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-flow-flowdefinition.html) .
definitionSubstitutionsOptionalIResolvable | { [key: string]: string | number | boolean | IResolvable }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` and `DefinitionS3Location` fields. Substitutions must follow the syntax: `${key_name}` or `${variable_1,variable_2,...}` .
descriptionOptionalstringA description of the flow.
tagsOptional{ [key: string]: string }Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:. - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions) - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
testAliasTagsOptional{ [key: string]: string } | IResolvableA map of tag keys and values.
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-bedrockAWS::Bedrock::Flow