Monitor and Manage Your Human Loop
Once you've started a human review loop, you can check the results of tasks sent to the
loop and manage it using the Amazon Augmented AI Runtime API.
Additionally, Amazon A2I integrates with Amazon EventBridge (also known as Amazon CloudWatch Events) to alert you
when a human review loop status changes to Completed, Failed, or
Stopped. This event delivery is guaranteed at least once, which means all
events created when human loops finish are successfully delivered to EventBridge.
Use the procedures below to learn how to use the Amazon A2I Runtime API to monitor and manage your human loops. See Use Amazon CloudWatch Events in Amazon Augmented AI to learn how Amazon A2I integrates with Amazon EventBridge.
To check your output data:
-
Check the results of your human loop by calling the
DescribeHumanLoopoperation. The result of this API operation contains information about the reason for and outcome of the loop activation. -
Check the output data from your human loop in Amazon Simple Storage Service (Amazon S3). In the path to the data,
represents the human loop creation date with year (YYYY/MM/DD/hh/mm/ssYYYY), month (MM), and day (DD), and the creation time with hour (hh), minute (mm), and second (ss).s3://customer-output-bucket-specified-in-flow-definition/flow-definition-name/YYYY/MM/DD/hh/mm/ss/human-loop-name/output.json
You can integrate this structure with AWS Glue or Amazon Athena to partition and analyze your output data. For more information, see Managing Partitions for ETL Output in AWS Glue.
To learn more about Amazon A2I output data format, see Amazon A2I Output Data.
To stop and delete your human loop:
-
Once a human loop has been started, you can stop your human loop by calling the
StopHumanLoopoperation using theHumanLoopName. If a human loop was successfully stopped, the server sends back an HTTP 200 response. -
To delete a human loop for which the status equals
Failed,Completed, orStopped, use theDeleteHumanLoopoperation.
To list human loops:
-
You can list all active human loops by calling the
ListHumanLoopsoperation. You can filter human loops by the creation date of the loop using theCreationTimeAfterandCreateTimeBeforeparameters. -
If successful,
ListHumanLoopsreturnsHumanLoopSummariesandNextTokenobjects in the response element.HumanLoopSummariescontains information about a single human loop. For example, it lists a loop's status and, if applicable, its failure reason.Use the string returned in
NextTokenas an input in a subsequent call toListHumanLoopsto see the next page of human loops.