aws-samples / aws-samples/amazon-textract-idp-cdk-constructs

Issue:

Open
#99 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
33
Forks
14
PR merge metrics
No merged PRs in 30d

Description

### Error:
```
Task failed to render: [ UndefinedTemplateVariable: 'undefined variable url'; UndefinedTemplateVariable: 'undefined variable image_width'; UndefinedTemplateVariable: 'undefined variable image_height'; UndefinedTemplateVariable: 'undefined variable Co
```

### Documentation:
https://constructs.dev/packages/amazon-textract-idp-cdk-constructs/v/0.0.6/api/TextractA2ISfnTask?lang=typescript

### Code:
```
textract_sync_task_id = tcdk.TextractGenericSyncSfnTask(
self,
"TextractSyncOCRInsurance",
s3_output_bucket=document_bucket.bucket_name,
s3_output_prefix=s3_output_prefix,
integration_pattern=sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
lambda_log_level="DEBUG",
timeout=Duration.hours(24),
input=sfn.TaskInput.from_object({
"Token":
sfn.JsonPath.task_token,
"ExecutionId":
sfn.JsonPath.string_at('$$.Execution.Id'),
"Payload":
sfn.JsonPath.entire_payload,
}),
result_path="$.textract_result")

textract_a2i_task = tcdk.TextractA2ISfnTask(
self,
"TextractA2I",
a2i_flow_definition_arn=
"arn:aws:sagemaker:us-east-1:913165245630:flow-definition/textract-classifiction",
integration_pattern=sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
lambda_log_level="DEBUG",
timeout=Duration.hours(24),
input=sfn.TaskInput.from_object({
"Token":
sfn.JsonPath.task_token,
"ExecutionId":
sfn.JsonPath.string_at('$$.Execution.Id'),
"Payload":
sfn.JsonPath.entire_payload,
}),
result_path="$.a2i_result")
```

### Preview
![Screenshot 2023-06-28 at 9 00 36 PM](https://github.com/aws-samples/amazon-textract-idp-cdk-constructs/assets/11032490/21945e93-b89d-4956-93e8-4bfee6420cc4)

### Question
- Is this because the original image is a PDF

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.