> For the complete documentation index, see [llms.txt](https://docs.datasaur.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasaur.ai/assisted-labeling/ml-assisted-labeling/amazon-sagemaker.md).

# Amazon SageMaker

{% hint style="info" %}
**Supported labeling types**: Row labeling.
{% endhint %}

You can integrate your Amazon SageMaker Inference Endpoint for data labeling with **ML-assisted labeling**.

## Enable ML-assisted labeling extension

1. [Create a custom project ](https://datasaurai.gitbook.io/datasaur/nlp-projects/creating-a-project)for row labeling.
2. Click the gear icon from the extension panel to open the **Manage extensions** dialog.
3. Enable the **ML-assisted labeling** extension.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-3c0e599e2460cff3423a2d0626a5afe6ab29cbe4%2FExtension%20-%20Manage%20extensions%20-%20ML-assisted%20Labeling.png?alt=media" alt="Image of Manage Extension Pop Up to enable ML assisted"><figcaption><p>Manage extensions dialog</p></figcaption></figure>

4. Once enabled, select **Amazon SageMaker** as the service provider.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-4ca4957e4859295dad4eddb61775e4dd7e65a744%2FExtension%20-%20ML-assisted%20Labeling%20-%20Row%20labeling%20-%20Amazon%20Sagemaker%20-%20highlight.png?alt=media" alt="Image of ML Assisted with Amazon SageMaker"><figcaption></figcaption></figure>

## Setup role in AWS Identity and Access Management (IAM)

Before creating a role in the **IAM** page, create the required policies to define permissions for the new role.

1. Go to your **IAM** page, navigate to the **Policies** section, and then create a new policy.
2. Download the example below and add it.

{% file src="/files/zFJXgAXxct7lrTKFXifC" %}

After that, proceed to create a new role:

1. Go to the **IAM** page and navigate to the **Roles** section.
2. Click **Create Role**, then select **AWS account** as the role type.
3. Enter the **Account ID** and **External ID**. These values are automatically generated in the Datasaur **ML-assisted labeling** extension and can be copied into AWS.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-0d95e349ac64c7df52a075da576ae7f9887f6d00%2FExtension%20-%20ML-assisted%20Labeling%20-%20Row%20labeling%20-%20Amazon%20SageMaker%20-%20select%20trusted%20entity.png?alt=media" alt="Image of Select trusted entity menu"><figcaption><p>Select trusted entity</p></figcaption></figure>

3. On the **Add permissions** step, search the policy you created before and add them to the permissions.
4. Provide a role name and click **Create role.** You can check the trusted policies config below. The role will be created successfully.

{% file src="/files/uDPoWAE6RkCszEfqglQG" %}

5. View your role and copy the **Role ARN**.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-2e77b11e33fb695f1ee49cb8899c84093da388ff%2FExtension%20-%20ML-assisted%20Labeling%20-%20Row%20labeling%20-%20Amazon%20SageMaker%20-%20identity%20and%20access%20management.png?alt=media" alt="Image of Role page to copy role ARN"><figcaption></figcaption></figure>

7. Paste this information into the **ML-assisted labeling** extension.
8. Go back to the **Amazon SageMaker** page and retrieve the **Endpoint ARN**. Copy it and paste it into the extension.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-fa5230e952a8f63b05527de09e29cd1029e5444b%2FExtension%20-%20ML-assisted%20Labeling%20-%20Row%20labeling%20-%20Amazon%20SageMaker%20-%20endpoint%20details.png?alt=media" alt="Image of Endpoint Details"><figcaption><p>Endpoint details</p></figcaption></figure>

## Start prediction

Once you have configured the settings, click **Predict labels** to generate predictions from your model.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-8fb8dc1b64532bdb3e459fcc06b37671cb5fbd17%2FExtension%20-%20ML-assisted%20Labeling%20-%20Row%20labeling%20-%20Amazon%20SageMaker%20-%20project.png?alt=media" alt="Image of Prediction result"><figcaption><p>Prediction appears</p></figcaption></figure>
