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

lambda_textract_detect_text.py has recursion with S3 #39

Open
Shyam-Prag opened this issue Aug 31, 2023 · 0 comments
Open

lambda_textract_detect_text.py has recursion with S3 #39

Shyam-Prag opened this issue Aug 31, 2023 · 0 comments

Comments

@Shyam-Prag
Copy link

This file has the below code which attempts to put the text into a .txt file and sends to the same bucketName which will cause another object to be placed into the same bucket which in turn invokes Lambda again.
This bucket name should be changed to a separate bucket to avoid recursion if you want to view the text in .txt file in S3.

           s3.put_object(
                Bucket=bucketname,
                Key=f"output/{filename.split('/')[-1]}_{uuid.uuid4().hex}.txt",
                Body=str("\n".join(raw_text)),
            )
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

1 participant