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

MIT No Attribution
30 stars 13 forks source link

Issue: #99

Open MichaelWalker-git opened 1 year ago

MichaelWalker-git commented 1 year ago

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

Question