amazon-textract-idp-cdk-constructs
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
Release history Release notifications | RSS feed
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
Close
Hashes for amazon-textract-idp-cdk-constructs-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33db6b6555b64fb18fc434643aad2b672c1808d326fb1a54fec803cfb8ccc593 |
|
MD5 | 980f5b561d4e2a2e3df7c38c9ed6d852 |
|
BLAKE2b-256 | 553ab762436a617004b9b1fc951035d1d658eadf3845bc62e5bdcd7d6f605301 |
Close
Hashes for amazon_textract_idp_cdk_constructs-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70e56dbd8e1ee0f18f28337ff45cdd1989b49cf25e0f134a80fcbf99047f1bae |
|
MD5 | 92e0dc4aba1668dbbff9e0728f7d18ec |
|
BLAKE2b-256 | 85fe16f968ef4bfa769f4bd61a779db301cf15fc4c75eeb990fd56c8278e9775 |