Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process fails when input file contains spaces #1

Closed
mmendelson222 opened this issue Jun 1, 2019 · 2 comments
Closed

Process fails when input file contains spaces #1

mmendelson222 opened this issue Jun 1, 2019 · 2 comments

Comments

@mmendelson222
Copy link

Lambda TextractAsyncJobSubmitFunction runs to success, but actually fails to process the file. The following errors can be seen in CloudWatch:

  • An error occurred (InvalidParameterException) when calling the StartDocumentAnalysis operation: Request has invalid parameters
  • An error occurred (InvalidParameterException) when calling the StartDocumentTextDetection operation: Request has invalid parameters

Two issues: 1. the problem specified above, and 2. the Lambda itself should probably fail under these circumstances (can't perform operation after retries).

Thanks for this code.

@dbinoy
Copy link
Contributor

dbinoy commented Aug 22, 2019

Thanks for bringing this to attention. The code in job submission Lambda now checks for invalid parameter exception, and fails gracefully with failure message captured in Log and returned to invocation source.

@dbinoy dbinoy closed this as completed Aug 22, 2019
@matwerber1
Copy link

I don't think spaces are the root cause; it has to do with the fact that the S3 event is URL encoding the S3 key name and the Lambda isn't decoding it before passing to Textract. I opened issue #2 with PR #3 to decode the key name which should allow spaces to be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants