AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Bedrock::Flow

CfnFlow

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](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

import { CfnFlow } from 'aws-cdk-lib/aws-bedrock';

Or use the module namespace:

import * as bedrock from 'aws-cdk-lib/aws-bedrock';
// bedrock.CfnFlow

Properties

Configuration passed to the constructor as CfnFlowProps.

executionRoleArnRequired
string

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](https://docs.aws.amazon.com/bedrock/latest/userguide/flows-permissions.html) in the Amazon Bedrock User Guide.

nameRequired
string

The name of the flow.

customerEncryptionKeyArnOptional
string

The Amazon Resource Name (ARN) of the KMS key that the flow is encrypted with.

definitionOptional
IResolvable | FlowDefinitionProperty

The definition of the nodes and connections between the nodes in the flow.

definitionS3LocationOptional
IResolvable | S3LocationProperty

The Amazon S3 location of the flow definition.

definitionStringOptional
string

The 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) .

definitionSubstitutionsOptional
IResolvable | { [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,...}` .

descriptionOptional
string

A 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 } | IResolvable

A map of tag keys and values.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter