> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/a/aws-sagemaker.md).

# AWS SageMaker

Amazon SageMaker builds and hosts machine learning models. OctoXLabs lists the model endpoints and their production variants as AI assets.

## Use cases

* List every ai asset that AWS SageMaker contributes to the inventory.

```
Adapters = aws-sagemaker
```

* Check what one AWS SageMaker connection collected.

```
Connections = YOUR_CONNECTION_NAME
```

## Before you begin

### Network

| Source              | Destination                                                                     | Port | Protocol |
| ------------------- | ------------------------------------------------------------------------------- | ---- | -------- |
| OctoXLabs connector | SageMaker regional endpoint, for example api.sagemaker.eu-north-1.amazonaws.com | 443  | HTTPS    |

### Required permissions

| Scope or role                    | Permission | Needed for                            |
| -------------------------------- | ---------- | ------------------------------------- |
| sagemaker:ListEndpoints          | Read       | Endpoint list and the connection test |
| sagemaker:DescribeEndpoint       | Read       | Endpoint details                      |
| sagemaker:DescribeEndpointConfig | Read       | Production variants                   |

The permissions are inferred from the API calls in the adapter. The source text does not list them. Not verified against vendor text.

## Create credentials in AWS SageMaker

Create an IAM user (or role) with the read-only permissions above, then create an access key for it. See [AWS access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html). The secret is shown only once.

## Connection parameters

| Parameter         | Required | Type    | Default | Description                                                                   |
| ----------------- | -------- | ------- | ------- | ----------------------------------------------------------------------------- |
| Access Key ID     | Yes      | String  | None    | AWS Access Key ID.                                                            |
| Secret Access Key | Yes      | String  | None    | AWS Secret Access Key.                                                        |
| Region            | Yes      | String  | None    | Region where the models and endpoints are deployed, for example `eu-north-1`. |
| Proxy             | No       | String  | None    | Proxy address. The connector sends requests through `http://<value>`.         |
| Thread Count      | No       | Integer | 32      | Parallel threads. Minimum 1, maximum 32.                                      |
| Sleep Time        | No       | Integer | 0       | Delay in seconds between thread batches.                                      |

## Troubleshooting

| Error message                                                          | Cause                                                                  | Fix                                                                                                                                           |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Status Code: `, followed by the URL, the method and the response body` | The API answered with a status other than the one the adapter expects. | Read the code and body. 401 or 403 usually points to wrong credentials or missing permissions. Check the address, port and Is Secure setting. |

## Change history

{% hint style="info" %}
Available starting from version 6.0.0.
{% endhint %}
