Skip to content

lambda_textract_detect_text.py has recursion with S3 #39

Open
@Shyam-Prag

Description

@Shyam-Prag

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)),
            )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions