> For the complete documentation index, see [llms.txt](https://docs.expel.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.expel.io/connect-your-technology/a-c-integrations/amazon-aws/aws-guardduty-setup-for-workbench.md).

# AWS GuardDuty Setup for Workbench

This setup guide helps you connect AWS GuardDuty to Workbench.

## Prerequisites

1. You must have an AWS account with permissions to create and change IAM roles.
2. If you use AWS Organizations, make sure you have your AWS Account ID.
3. If your organization centralizes CloudTrail logs from multiple subsidiaries into a single S3 bucket, make sure you know the AWS Organizational Unit (OU) ID for the subsidiary.
   * This is an optional prerequisite that enables us to filter logs so that only the relevant data is sent to each subsidiary's Workbench instance, preventing data overlap.

If you need help finding any of these values, see this [Reference](/connect-your-technology/a-c-integrations/amazon-aws/aws-cloudtrail/aws-cloudtrail-manual-setup-new-trail.md#reference) section.

## Before You Begin

Choose your onboarding method:

* **If you prefer to use a wizard,** which leverages CloudFormation templates, skip to [Step 3](#step-3-add-aws-guardduty-as-a-security-device-in-workbench). You will need your AWS account ID and AWS region. &#x20;
* **If you prefer to follow the manual setup instructions**, continue to [Step 1.](#step-1-create-an-aws-iam-policy)

## Step 1: Create an AWS IAM Policy

{% hint style="warning" %}
**This step is only for those choosing manual setup.** In addition:

* **AWS GuardDuty Delegated Admin accounts:** complete the following steps in the account's primary region (you will only add one security device in Workbench).
* **All other account types:** complete the following steps for *each account* you want monitored (every account will need its own security device in Workbench).
  {% endhint %}

In this step, you will create a permissions policy to assign to the IAM Role.

1. Log into the AWS console and navigate to the **IAM service**.
2. Go to **Policies** and select **Create Policy**.
3. Add the following permissions using the JSON tab:

```
{
   "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "guardduty:GetFindings",
                "guardduty:ListDetectors",
                "ec2:DescribeRegions",
                "guardduty:ListFindings",
                "guardduty:GetDetector"
            ],
             "Resource": "*"
        }      
    ]
}
```

4. Review the policy and give it a name.

## Step 2: Create an IAM Role

{% hint style="warning" %}
**This step is only for those choosing manual setup.** In addition:

* **AWS GuardDuty Delegated Admin accounts:** complete the following steps in the account's primary region (you will only add one security device in Workbench).
* **All other account types:** complete the following steps for *each account* you want monitored (every account will need its own security device in Workbench).
  {% endhint %}

In this step, you will create an IAM role to connect to your AWS GuardDuty Service.

1. From within the IAM service, navigate to **Roles** and select **Create Role**.
2. Select **Another AWS account** and fill out the required fields:
   * **Account ID** - enter `012205512454` (the Expel AWS account ID).
   * **External ID** - this is your [Workbench GUID](#user-content-fn-1)[^1].
3. Attach the IAM policy from Step 1 to the role.
4. Give the role a name and then select **Create Role**.
5. Navigate to the role you just created and copy the following information, as you will need it in the next step.
   * Role ARN
   * External ID Value (on the Trust relationships tab)

{% hint style="warning" %}
If your organization centralizes CloudTrail logs from multiple subsidiaries into a single S3 bucket, you will need to either edit this IAM Role to add two additional permissions for Expel, or create a separate IAM role with those permissions.&#x20;

The two additional permissions are:

* `organizations:ListAccountsForParent`
* `organizations:ListOrganizationalUnitsForParent`

If you wish to create a separate IAM Role with the two permissions, make sure to save that IAM Role ARN as your **AWS OU Role ARN**. You will need it when you set up the security device in Workbench.
{% endhint %}

## Step 3: Add AWS GuardDuty as a Security Device in Workbench

{% hint style="info" %}
Before you begin, make sure you have your IAM Role ARN and Role Session Name. If you use AWS Organizations, you will also need your AWS Account ID as well as the subsidiary's AWS Organizational Unit (OU) ID (the OU ID is only necessary if you use a single S3 bucket for multiple subsidiaries). If you need additional help finding any of these values, see this [Reference](/connect-your-technology/a-c-integrations/amazon-aws/aws-cloudtrail/aws-cloudtrail-manual-setup-new-trail.md#reference) for detailed instructions.
{% endhint %}

1. [Log in to Workbench](https://workbench.expel.io/auth/login?orig=%2F).
2. Navigate to **Organization Settings > Security Devices**.
3. Select **Add Security Device**.
4. Scroll down or search "AWS" and select AWS GuardDuty.
5. Do one of the following:
   * Select **Connect manually >>** and continue to step 6.
   * Select **Connect with wizard >>** and follow the on-screen instructions to complete the setup.
6. For manual setup, complete the fields as follows:
   * **Name** - enter a name that might help you more easily identify this integration, such as “CompanyName GuardDuty”; this name will display in Workbench under the Name column, and is a text string that you can filter on.
   * **Location** - enter the location of your integration, for example “cloud;” this is also a text string that you can filter on, so we recommend being consistent with location naming across your Expel integrations.
   * **Role ARN** - enter the Role ARN from [Step 2](#step-2-create-an-iam-role).
   * **Role session name** - enter a unique name to identify the role.
   * **AWS region** - select the region of the primary AWS GuardDuty account.
   * **AWS OU ID** - if you use AWS Organizations to centralize CloudTrail logs from multiple subsidiaries into a single S3 bucket, enter the AWS OU ID for the relevant subsidiary (format: `ou-abc1-defghi2j`); otherwise, leave this field blank. This field tells our system to filter the logs based on that ID, ensuring that each subsidiary's Workbench instance only ingests and analyzes the logs relevant to its own accounts, which helps prevent any overlap of data.
   * **AWS OU Role ARN** - if you entered an AWS OU ID, you will also need to enter the IAM Role ARN that contains the appropriate permissions. If you chose to add these permissions to your existing IAM Role, enter the IAM Role ARN again here. If you chose to create a new IAM Role with those permissions, enter your AWS OU Role ARN. Otherwise, leave this field blank.
7. Select **Save**.

{% hint style="warning" %}
If you are *not* using a GuardDuty Delegated Admin account, you must repeat these steps for each account you want monitored.
{% endhint %}

Your device should be created successfully within a few seconds. A few reminders:

* After your connection is healthy, it will take some time for your device to begin polling and receiving data.
* To check on the status, select the downward arrow for your device in the first column and choose **View details**.
* Polling will happen first; data will be received after that. **You must refresh the page to see updates.**
* If your device does not begin polling within 15 minutes, and does not begin receiving data within 30 minutes, [contact our support team for help](/support/how-to-reach-us.md).
* To check if alerts are coming through, navigate to **Dashboards > Alert Analysis**. Scroll to the device you want to check, and select the **Expel Alerts** tab to reveal more alert information. It can take 36 to 72 hours for alerts to appear after setup, as we [tune your device](/workbench-reference/alerts/how-expel-alerts-work.md#device-tuning).

[^1]: - [Log in to Workbench](https://workbench.expel.io/auth/login?orig=%2F).
    - Go to **Organization Settings > My Organization**.
    - On the organization's page, look for the Organization GUID and select the **Copy** button to copy the GUID.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.expel.io/connect-your-technology/a-c-integrations/amazon-aws/aws-guardduty-setup-for-workbench.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
