# Datasaur Dinamic with Amazon SageMaker Autopilot

## Introduction

**Datasaur Dinamic** with [Amazon SageMaker](https://aws.amazon.com/sagemaker/train/) integration enables you to create an end-to-end model building process using the combination of Datasaur and AWS. This will directly connect your labeled data to your Amazon Sagemaker environment and start the training.

## Quick Start Guide

Here's a step-by-step guide to achieving optimal results with our **Datasaur Dinamic**:

### Setup Datasaur Dinamic Extension

{% hint style="info" %}
Please make sure you have access to our **Datasaur Dinamic** feature to enable the **Datasaur Dinamic** extension in the extension settings.
{% endhint %}

1. [Create a custom project](/data-studio-projects/creating-a-project.md) for row labeling and add your pre-labeled data or unlabeled data to this project.
2. We recommend labeling the data and reviewing it to check data quality.
3. Click **Manage extensions** (gear icon) from the extension panel on the right.
4. The **Manage extensions** dialog will appear and you can enable the **Datasaur Dinamic** extension.

<figure><img src="/files/C3I16RaCCPmGZHyCGRrO" alt=""><figcaption><p>Manage Extension Pop Up</p></figcaption></figure>

5. **Datasaur Dinamic** is now enabled and ready for you to use.

   <figure><img src="/files/lbgBlvcm9agY3jdpXl3q" alt=""><figcaption></figcaption></figure>

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

{% hint style="info" %}
Please make sure you have an AWS S3 Bucket available to run your model training and store it. Write the AWS S3 Bucket Name in **Datasaur Dinamic**.
{% endhint %}

Before we start to create Role in the IAM page, please create these policies first for your permissions when creating a new Role.

1. Go to your IAM page, navigate to the **Policies** section, and then create a new policy.

   <figure><img src="/files/N7QwJRtYvhP5Tdr3rxg2" alt=""><figcaption></figcaption></figure>
2. You will need to create 2 policies, ***sagemaker-limited-access*** and ***sagemaker-s3-specific-permissions.*** You can download the examples below and edit the variables according to your bucket information.

{% file src="/files/zFJXgAXxct7lrTKFXifC" %}
sagemaker-s3-specific-permissions
{% endfile %}

{% file src="/files/l5Ka6FxshtMHLUw0pSlF" %}
sagemaker-limited-access
{% endfile %}

Now you have 2 policies for role permission access. We can continue to create a new Role

1. Go to the **IAM** page and navigate to the **Roles** section
2. Click on **Create roles** then select **AWS account** as the role type and insert the **Account ID** and **External ID**. These values are automatically generated within the Datasaur Dinamic and can be copied and pasted into the AWS platform.

   <figure><img src="/files/gpWoPP6RvPYxwzAzQeuq" alt=""><figcaption><p>Select trusted entity</p></figcaption></figure>
3. After finishing the first step, you can see the **Add permissions** step and search the policies you created before. Add them to the permissions policies.

   <figure><img src="/files/72YMzkmuoohVVzO3oAnr" alt=""><figcaption><p>Add permissions</p></figcaption></figure>
4. Now in IAM Roles step 3 (**Name, review, and create**), you can start to specify the name of the Role and detail.
5. After you are done creating the Role, go to the Trust Relationships tab to edit it and add these lines

   ```
   {
       "Effect": "Allow",
       "Principal": {
           "Service": "sagemaker.amazonaws.com"
       },
       "Action": "sts:AssumeRole"
   }
   ```

<figure><img src="/files/vitFyQSA98OJvlnb1ajE" alt=""><figcaption><p>Edit Trust Relationships</p></figcaption></figure>

6. You should able to get the ARN of that role in the **Role Summary** and copy it to **Datasaur Dinamic**.

   <figure><img src="/files/3U581yFj9gQwmoOH2BeA" alt=""><figcaption><p>Role Summary</p></figcaption></figure>

## Start Training

1. At this point, you should have ***AWS S3 Bucket Name*** and ***Role ARN*** inputs filled in the **Datasaur Dinamic** extension.

<figure><img src="/files/ivKBGSrr0dZ6e9QC13hS" alt=""><figcaption><p>Datasaur Dinamic with Amazon Sagemaker</p></figcaption></figure>

2. Now, click the **Train** button to start your training using Amazon SageMaker Autopilot.

<figure><img src="/files/FgnttSfclMcF2zHEcRuz" alt=""><figcaption><p>Datasaur Dinamic training progress</p></figcaption></figure>

3. Voila! You will get your model name, and you can search for it in your Amazon SageMaker Model list.

<figure><img src="/files/egzM8Cld65ryh2vf44Al" alt=""><figcaption><p>Datasaur Dinamic Model Name</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datasaur.ai/build-model/datasaur-dinamic/aws-sagemaker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
