---
title: "Setting up AWS Textract for Frameworks Document Scanning"
canonical: "https://kb.myframeworks.com.au/space/FRAM/28390652/Setting%20up%20AWS%20Textract%20for%20Frameworks%20Document%20Scanning"
format: markdown
---
# Overview

To enable the AWS Textract service required for the Supplier Invoice Scanning module.

> 📝 This guide is for On-premise versions of Frameworks running version 6.1.230815 or higher. If you are a Frameworks Cloud customer, this is already configured.

# What is AWS Textract 

The AWS Textract OCR service uses machine learning (ML) to scan and extract invoice data from the physical document. 

> Macro (excerpt-include)



> ⚠️ **Important: **Please ensure you have [Set up an AWS S3 bucket](https://sterlandsupport.atlassian.net/wiki/spaces/FRAM/pages/28377956) before performing the following steps.

> ✅ Refer to [About Supplier Invoice Scanning](https://sterlandsupport.atlassian.net/wiki/spaces/FRAM/pages/28377968) for more information on how Frameworks takes advantage of this service.

## Setting up the Textract Service

1. Sign in to your AWS Management Console by navigating to [https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/).
2. From the AWS console search for **IAM.**
  
3. Select **Policy** and **Create policy.**
4. In the **Policy editor, **select **JSON **and **Add actions.** Add the following Actions, by enabling their checkboxes.
  1. textract:AnalyzeExpense”,
  2. textract:GetExpenseAnalysis” and
  3. textract:StartExpenseAnalysis”
    
5. **Add a resource** by clicking **Add**.
6. Enter the following details and click **Add resources.**
  1. **Service**: Textract
  2. **Resources** **type**: All Resources
  3. **Resources ARN**: *
    
7. Select **Add new statement, **then **Add Action **S3:GetObject
8. Select **Add a resource** and add the reference to your S3 bucket that you store your attachment in.
  
9. Once completed, your Policy should look like this:
10. Choose **Next**, give your policy a name and click **Create policy.**
  

---

# Create a User with access to execute the Textract API.

1. Select **Users **and click **Add users.**
2. Enter the **User name**, ensure you disable **Provide user access to the AWS Management Console **and click **Next.**
3. Choose **Attach policies directly.**
4. Select the Policy you created earlier and click **Next.**
  
5. From the **Review and create** screen, review the details and click **Create user.**
  

---

# Create an Access Key for your User

1. Select the **User** > **Security credentials** and under the **Access Keys** section, click** Create access key.**
  
2. Select** **the **Application running outside AWS** option and click **Next.**
  
3. Enter** S3 access for Frameworks Attachments** as the **Description tag value** and click **Create access key.**
  
4. **IMPORTANT** - **Copy the following information because you won’t see this again!**  
You will need the **Access key**, **Secret access key**,** bucket name** and **region **for the Frameworks configuration next.
5. Click **Download .csv file** and save it to your computer, then click **Done.**
  

---

## Setting up Document Scanning in Frameworks

Find and update the **host.properties **file where you set up the S3 access keys for the Frameworks environment.

The file should contain the following entries:

```
# Does this server host multiple tenants?
isMultiTenant=false

############################################################################
# The Frameworks Attachment System can store attachments in an S3 bucket rather
# than an attachment directory on disk.
# If the value in the Misc Table Setting for "SysAttPath" is "AWSS3" then a S3 bucket is used.
# These settings define the keys and configurations used by Frameworks
############################################################################

#The AWS Access Key ID used to store FW attachments in a S3 bucket
attachments.awsAccessKey=
#The AWS Access Secret Key used to store FW attachments in a S3 bucket
attachments.awsSecretKey=
#The AWS S3 Bucket name used to store FW attachments in a S3 bucket
attachments.awsBucketName=
#The AWS Region used to store FW attachments in a S3 bucket
attachments.awsRegionName=
```


1. Update the host.properties file and add the following entries:
  **For Example:**
  1. textract.awsAccessKey=ABCD
  2. textract.awsSecretKey=dwwfre2323$#%
  3. textract.awsRegionName= ap-southeast-2
2. Make sure there are no spaces before or after the property values.
3. Restart the Appserver or trim the agents after setting up the host.properties file.