> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS CloudWatch

> Give agents access to AWS CloudWatch logs, metrics, and alarms.

The `@guildai-services/guildai~aws-cloudwatch` package gives your agents access to AWS CloudWatch logs, metrics, and alarms through Guild's AWS CloudWatch integration.

## Authentication

* **Type:** AWS credentials (Access Key ID and Secret Access Key)

### Setup

<Steps>
  <Step title="Open Credentials">Go to **Credentials** in Guild.</Step>
  <Step title="Connect AWS CloudWatch">Click **AWS CloudWatch** and enter your AWS Access Key ID and Secret Access Key. The IAM user or role must have CloudWatch and CloudWatch Logs read permissions.</Step>
</Steps>

## Usage

```typescript theme={null}
import { awsCloudwatchTools } from "@guildai-services/guildai~aws-cloudwatch"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  description: "An agent that monitors AWS CloudWatch",
  tools: { ...awsCloudwatchTools },
})
```

### Selecting specific tools

Tools are named with the `aws_cloudwatch_` prefix. Use `pick()` to include only what your agent needs.

```typescript theme={null}
import { awsCloudwatchTools } from "@guildai-services/guildai~aws-cloudwatch"
import { llmAgent, pick } from "@guildai/agents-sdk"

export default llmAgent({
  description: "An agent that investigates CloudWatch alarms",
  tools: {
    ...pick(awsCloudwatchTools, [
      "aws_cloudwatch_describe_alarms",
      "aws_cloudwatch_get_metric_data",
      "aws_cloudwatch_logs_filter_log_events",
    ]),
  },
})
```
