amazon-web-servicesamazon-sagemakeramazon-textract

ClientError when calling CreateFlowDefinition operation in 'Intelligent Document Processing with AWS AI Services'


Within the notebook Amazon Augmented AI (A2I) and Textract Analyze Document, the error occurs after the following script being ran

uniqueId = str(uuid.uuid4())
flowDefinitionName = f'fd-textract-{uniqueId}'

flowDefinitionArn = create_flow_definition(flowDefinitionName)

The following error returns:

ClientError: An error occurred (ValidationException) when calling the CreateFlowDefinition operation: 1 validation error detected: Value 'arn:aws:sagemaker:ap-southeast-1:xxxxxxxxxxxx:flow-definition/a2idemotextract' at 'humanLoopConfig.workteamArn' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:workteam/.*


Solution

  • To solve the problem, double check to make sure you are using the right ARN in WORKTEAM_ARN to solve the error received.