Skip to main content

schadem-cdk-construct-textract-generic-async

Project description

Context

This CDK Construct can be used as Step Function task and call Textract in Asynchonous mode for DetectText and AnalyzeDocument APIs.

Input

Expects a Manifest JSON at 'Payload'. Manifest description: https://pypi.org/project/schadem-tidp-manifest/

Example call in Python

        textract_async_task = t_async.TextractGenericAsyncSfnTask(
            self,
            "textract-async-task",
            s3_output_bucket=s3_output_bucket,
            s3_temp_output_prefix=s3_temp_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")

Output

Adds the "TextractTempOutputJsonPath" to the Step Function ResultPath. At this location the Textract output is stored as individual JSON files. Use the CDK Construct schadem-cdk-construct-sfn-textract-output-config-to-json to combine them to one single JSON file.

example with ResultPath = textract_result (like configured above):

"textract_result": {
    "TextractTempOutputJsonPath": "s3://schademcdkstackpaystuban-schademcdkidpstackpaystu-bt0j5wq0zftu/textract-temp-output/c6e141e8f4e93f68321c17dcbc6bf7291d0c8cdaeb4869758604c387ce91a480"
  }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file schadem-cdk-construct-textract-generic-async-0.0.4.tar.gz.

File metadata

File hashes

Hashes for schadem-cdk-construct-textract-generic-async-0.0.4.tar.gz
Algorithm Hash digest
SHA256 e63b98ad9b49fa29a203d867205a5ee905e4cb34a843492dd142b2e52f9ed2b2
MD5 560114559921a497e73ae5ffd0ba19be
BLAKE2b-256 fa986c059d6a5e8c93d4a115d7242d77df5fdbe2df34931955f659d1c2c07a09

See more details on using hashes here.

File details

Details for the file schadem_cdk_construct_textract_generic_async-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for schadem_cdk_construct_textract_generic_async-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 92fc93ad52fd35905b8fb852a6596a8dbeb86b1aba94caa938e1b378571b4962
MD5 3750e69c533c779c8c9cb9039effe142
BLAKE2b-256 cdca59c07e3bbb2f52514127d4819845689a826726dbcb30c313836e5d27bd50

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page