Table of Contents
Create S3 Bucket
Create new S3 bucket in your selected AWS region access rules should Bucket and objects not public
Create an IAM User
Create a IAM user for Textract with the access of AmazonTextractFullAccess
and AmazonS3ReadOnlyAccess
Install AWS CLI on EC2 Ubuntu Linux Instance
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
To update your current installation of the AWS CLI, use following command:
sudo ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update
Configure AWS credentials
Set credentials in the AWS credentials
You can use /usr/local/bin/aws configure the easier way to configure aws credentials
AWS Access Key ID [None]: your_access_key_id
AWS Secret Access Key [None]: your_secret_access_key
Default region name [None]: your_aws_region
Default output format [None]:
Or you can also manually create following files and add the credentials
$ nano ~/.aws/credentials
[default]
aws_access_key_id = your_access_key_id
aws_secret_access_key = your_secret_access_key
$ nano ~/.aws/config
[default]
region = your_aws_region
Download & Install AWS SDK for Python (Boto3)
pip3 install boto3
For more details you can check AWS Textract Documentation