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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ab5913c34400dcc6a61b9ad700523a686e9cec2c6459e6ab05ed50c748d0d3b |
|
MD5 | 0053f90705f9bd2765ab3159e4f0c9ef |
|
BLAKE2b-256 | 674a31e409b27f1a67989fe098557334b6f9e7450ec07406ba41108e1b96317c |
Close
Hashes for amazon_textract_idp_cdk_constructs-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eb609c7776a7a87e2c01190e36c9a2bafe85a1e153856a81a2b298a7df21eb7 |
|
MD5 | f9ff3d033802c981cd144eaf7c9eb0a3 |
|
BLAKE2b-256 | 1c70c9f45c1a6cbcdc2ede229a0688b0f40eaa61e3fe4736be8810122291003a |