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

# AWS Services

AWS Services inventories managed cloud services in an AWS account. OctoXLabs lists S3 buckets, RDS databases, Lambda functions, load balancers, caches, DynamoDB tables, EKS and ECS clusters, CloudFront distributions and Redshift clusters as service assets.

## Use cases

* List every services asset that AWS Services contributes to the inventory.

```
Adapters = aws-services
```

* Check what one AWS Services connection collected.

```
Connections = YOUR_CONNECTION_NAME
```

## Before you begin

### Network

| Source              | Destination                                                     | Port | Protocol |
| ------------------- | --------------------------------------------------------------- | ---- | -------- |
| OctoXLabs connector | Regional AWS endpoints for the services above, plus EC2 and STS | 443  | HTTPS    |

### Required permissions

| Scope or role                                                                                                              | Permission | Needed for        |
| -------------------------------------------------------------------------------------------------------------------------- | ---------- | ----------------- |
| Read-only access to S3, RDS, Lambda, Elastic Load Balancing (v2), ElastiCache, DynamoDB, EKS, ECS, CloudFront and Redshift | Read       | Service inventory |
| EC2 (DescribeRegions)                                                                                                      | Read       | Region discovery  |
| STS (GetCallerIdentity)                                                                                                    | Read       | Connection test   |

The AWS managed policy **ReadOnlyAccess** covers all of these.

## Create credentials in AWS Services

Create an IAM user or role with the **ReadOnlyAccess** managed policy and an access key. The access key is under **Security Credentials** in the IAM console. The secret is shown only once.

## Connection parameters

| Parameter             | Required | Type   | Default     | Description                                                                                           |
| --------------------- | -------- | ------ | ----------- | ----------------------------------------------------------------------------------------------------- |
| AWS Access Key ID     | Yes      | String | None        | Access Key ID of an IAM user or role with read access to the listed services.                         |
| AWS Secret Access Key | Yes      | String | None        | Secret Access Key of that key.                                                                        |
| AWS Region (Optional) | No       | String | All regions | Limit collection to one region, for example `us-east-1`. If blank, all available regions are scanned. |

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