AWS::Comprehend::Flywheel - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


A flywheel is an Amazon resource that orchestrates the ongoing training of a model for custom classification or custom entity recognition. You can create a flywheel to start with an existing trained model, or Comprehend can create and train a new model.

When you create the flywheel, Comprehend creates a data lake in your account. The data lake holds the training data and test data for all versions of the model.

To use a flywheel with an existing trained model, you specify the active model version. Comprehend copies the model's training data and test data into the flywheel's data lake.

To use the flywheel with a new model, you need to provide a dataset for training data (and optional test data) when you create the flywheel.

For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.


To declare this entity in your Amazon CloudFormation template, use the following syntax:


{ "Type" : "AWS::Comprehend::Flywheel", "Properties" : { "ActiveModelArn" : String, "DataAccessRoleArn" : String, "DataLakeS3Uri" : String, "DataSecurityConfig" : DataSecurityConfig, "FlywheelName" : String, "ModelType" : String, "Tags" : [ Tag, ... ], "TaskConfig" : TaskConfig } }


Type: AWS::Comprehend::Flywheel Properties: ActiveModelArn: String DataAccessRoleArn: String DataLakeS3Uri: String DataSecurityConfig: DataSecurityConfig FlywheelName: String ModelType: String Tags: - Tag TaskConfig: TaskConfig



The Amazon Resource Number (ARN) of the active model version.

Required: No

Type: String

Pattern: arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-Z0-9](-*[a-zA-Z0-9])*)?

Maximum: 256

Update requires: No interruption


The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.

Required: Yes

Type: String

Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+

Minimum: 20

Maximum: 2048

Update requires: No interruption


Amazon S3 URI of the data lake location.

Required: Yes

Type: String

Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?

Maximum: 512

Update requires: Replacement


Data security configuration.

Required: No

Type: DataSecurityConfig

Update requires: No interruption


Name for the flywheel.

Required: Yes

Type: String

Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$

Minimum: 1

Maximum: 63

Update requires: Replacement


Model type of the flywheel's model.

Required: No

Type: String


Update requires: Replacement


Tags associated with the endpoint being created. A tag is a key-value pair that adds metadata to the endpoint. For example, a tag with "Sales" as the key might be added to an endpoint to indicate its use by the sales department.

Required: No

Type: Array of Tag

Update requires: No interruption


Configuration about the model associated with a flywheel.

Required: No

Type: TaskConfig

Update requires: Replacement

Return values


When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Amazon Resource Name (ARN) of the flywheel.

For more information about using the Ref function, see Ref.


The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.


The Amazon Resource Name (ARN) of the flywheel.