amazon-textract-textractor
amazon-textract-textractor copied to clipboard
I am missing something... ~/.aws/config and ~/.aws/credentials
Hello,
I was trying to run examples from this repo. I do not have prior experience with AWS. I am using conda env on Ubuntu 22.04. As per instructions I have installed the package using pip install "amazon-textract-textractor[dev]". Everything got installed without any hitch. Now I wanted to try out the table extractor example.
When I try to run:
extractor = Textractor(profile_name="default")
I get the error: ProfileNotFound: The config profile (default) could not be found
I found a workaround in one of the issue post: changing the profile_name to region_name
extractor = Textractor(region_name='us-west-2')
document = extractor.analyze_document(
file_source=image,
features=[TextractFeatures.TABLES],
save_image=True
)
Now when I proceed I get the error: NoCredentialsError: Unable to locate credentials
It seems I am missing the ~/.aws/config and ~/.aws/credentials files. Not sure how I was supposed to get them? Do I need to install the aws sdk first?