AWS Amazon SageMaker Flow Definition

This page shows how to write Terraform for Amazon SageMaker Flow Definition and write them securely.

code-icon

Fix issues in your cloud & app configurations

Test for misconfigurations of this resource in your cloud.

get-started-button

Terraform Example (aws_sagemaker_flow_definition)

Provides a Sagemaker Flow Definition resource.

Parameters

The following arguments are supported:

  • flow_definition_name - (Required) The name of your flow definition.
  • human_loop_config - (Required) An object containing information about the tasks the human reviewers will perform. See Human Loop Config details below.
  • role_arn - (Required) The Amazon Resource Name (ARN) of the role needed to call other services on your behalf.
  • output_config - (Required) An object containing information about where the human review results will be uploaded. See Output Config details below.
  • human_loop_activation_config - (Optional) An object containing information about the events that trigger a human workflow. See Human Loop Activation Config details below.
  • human_loop_request_source - (Optional) Container for configuring the source of human task requests. Use to specify if Amazon Rekognition or Amazon Textract is used as an integration source. See Human Loop Request Source details below.
  • tags - (Optional) A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Human Loop Config

  • human_task_ui_arn - (Required) The Amazon Resource Name (ARN) of the human task user interface.
  • public_workforce_task_price - (Optional) Defines the amount of money paid to an Amazon Mechanical Turk worker for each task performed. See Public Workforce Task Price details below.
  • task_availability_lifetime_in_seconds - (Required) The length of time that a task remains available for review by human workers. Valid value range between 1 and 864000.
  • task_count - (Required) The number of distinct workers who will perform the same task on each object. Valid value range between 1 and 3.
  • task_description - (Required) A description for the human worker task.
  • task_keywords - (Optional) An array of keywords used to describe the task so that workers can discover the task.
  • task_time_limit_in_seconds - (Optional) The amount of time that a worker has to complete a task. The default value is 3600 seconds.
  • task_title - (Required) A title for the human worker task.
  • workteam_arn - (Required) The Amazon Resource Name (ARN) of the human task user interface. Amazon Resource Name (ARN) of a team of workers. For Public workforces see AWS Docs.

Public Workforce Task Price

  • amount_in_usd - (Optional) Defines the amount of money paid to an Amazon Mechanical Turk worker in United States dollars. See Amount In Usd details below.
Amount In Usd
  • cents - (Optional) The fractional portion, in cents, of the amount. Valid value range between 0 and 99.
  • dollars - (Optional) The whole number of dollars in the amount. Valid value range between 0 and 2.
  • tenth_fractions_of_a_cent - (Optional) Fractions of a cent, in tenths. Valid value range between 0 and 9.

Human Loop Activation Config

Human Loop Activation Conditions Config

Human Loop Request Source

  • aws_managed_human_loop_request_source - (Required) Specifies whether Amazon Rekognition or Amazon Textract are used as the integration source. Valid values are: AWS/Rekognition/DetectModerationLabels/Image/V3 and AWS/Textract/AnalyzeDocument/Forms/V1.

Output Config

  • s3_output_path - (Required) The Amazon S3 path where the object containing human output will be made available.
  • kms_key_id - (Optional) The Amazon Key Management Service (KMS) key ARN for server-side encryption.

In addition to all arguments above, the following attributes are exported:

  • arn - The Amazon Resource Name (ARN) assigned by AWS to this Flow Definition.
  • id - The name of the Flow Definition.
  • tags_all - A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Example Usage (from GitHub)

An example could not be found in GitHub.

CloudFormation Example

CloudFormation code does not have the related resource.

Frequently asked questions

What is AWS Amazon SageMaker Flow Definition?

AWS Amazon SageMaker Flow Definition is a resource for Amazon SageMaker of Amazon Web Service. Settings can be wrote in Terraform.