> 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-iam.md).

# AWS IAM

AWS Identity and Access Management (IAM) manages access to AWS. OctoXLabs lists the IAM users of the account.

## Use cases

* Find AWS IAM accounts that have no match in your directory.

```
Adapters = aws-iam AND NOT Adapters = active-directory
```

* Check what one AWS IAM connection collected.

```
Connections = YOUR_CONNECTION_NAME
```

## Before you begin

### Network

| Source              | Destination       | Port | Protocol |
| ------------------- | ----------------- | ---- | -------- |
| OctoXLabs connector | iam.amazonaws.com | 443  | HTTPS    |

### Required permissions

| Scope or role | Permission | Needed for                        |
| ------------- | ---------- | --------------------------------- |
| iam:ListUsers | Read       | User list and the connection test |

The permission is inferred from the code calls. The source text does not list it. Not verified against vendor text.

## Create credentials in AWS IAM

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. |

## 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.1.1.
{% endhint %}
