> 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/workbench-setup/auto-remediations/deactivate-access-keys/aws-guardduty-deactivate-access-keys.md).

# AWS GuardDuty: Deactivate Access Keys

*This guide is the first step of a larger process to enable auto remediations. After completing the steps on this page, you will be instructed to return to the* [*Enable an Auto Remediation in Workbench*](/workbench-setup/auto-remediations/enable-an-auto-remediation-in-workbench.md) *guide to finish your setup.*

## How It Works <a href="#h_01jgydp2j2h80jh6z0z91at9ne" id="h_01jgydp2j2h80jh6z0z91at9ne"></a>

If our SOC identifies a long-term access key that must be deactivated in order to mitigate the risk of a data breach, Workbench completes the action automatically. You have the option to restrict these actions to specific access keys by configuring an allow or deny list (the access keys must first be added as context, and then the list can be configured in Workbench; see [Step 3](#h_01jh5zhtqthkyym38xnhr25vgj)).

## Step 1: Find the Role Name in Workbench <a href="#h_01jh8jdnjtzb13cjmz9dpcbpvz" id="h_01jh8jdnjtzb13cjmz9dpcbpvz"></a>

1. [Log in to Workbench](https://workbench.expel.io/auth/login?orig=%2F).
2. Navigate to **Organization Settings > Security Devices**.
3. Next to the name of your AWS GuardDuty device, in the dropdown, select **Edit**.
4. In the Edit Security Device window, find the Role ARN that you configured during AWS GuardDuty onboarding.
5. Copy and save the role name, which is usually the last portion of the Role ARN field after the forward slash (for example, *ExpelServiceRole*, *ExpelGuarddutyAssumeRole*, or *ExpelRole*).

   <div align="left"><figure><img src="/files/nIHNd59NtHIAl1EcOMok" alt="In this example, ExpelServiceRole is highlighted in the Role ARN field." width="375"><figcaption></figcaption></figure></div>
6. Close the Edit Security Device window.

## Step 2: Add Permissions to the Existing Expel Policy in the AWS Console <a href="#h_01jh8jgjj5wr4r0jyxw8bdr5mx" id="h_01jh8jgjj5wr4r0jyxw8bdr5mx"></a>

1. [Log in to the AWS IAM console](https://console.aws.amazon.com/iam/).
2. Navigate to Roles.
3. On the Roles screen, find and open the role whose name you saved in the previous step.

   <div align="left"><figure><img src="/files/BhrgsQIYaIjuNRK8CCpj" alt="In this example, ExpelServiceRole is selected in the Roles list in GuardDuty." width="375"><figcaption></figcaption></figure></div>
4. Find and open the attached policy that was configured during onboarding (for example, *ExpelGuardDutyConnectorPolicy* or *ExpelAPIPolicy*).
5. Add the following permissions to the `"Resource": "*"` section:

   * `iam:List*`
   * `iam:Get*`
   * `iam:UpdateAccessKey`

   *If CloudFormation manages this policy, edit this policy at the source of truth so the edits aren’t accidentally overwritten later.*

   <div align="left"><figure><img src="/files/gqcLL38qY71U3cRQ1OpL" alt="The three permissions are added to the Resource section in the GuardDuty Policy editor." width="375"><figcaption></figcaption></figure></div>
6. Save the policy.
7. Repeat both steps of the process for each of your configured AWS GuardDuty devices.

## Step 3: Update Your Context <a href="#h_01jh5zhtqthkyym38xnhr25vgj" id="h_01jh5zhtqthkyym38xnhr25vgj"></a>

**If you do not want to specify any access keys for a "do not deactivate" or "always deactivate" list, and instead wish for Expel to automatically deactivate&#x20;*****all*****&#x20;identified access keys, skip to** [**Step 4**](#h_01jgycgywj4m9tc7j443dvsmf1)**.**

Working with your Customer Success Manager, prepare to create an allow or deny list by adding access keys as [org context](/workbench-reference/expel-terminology.md#org-context) for your environment. You will then be able to select those access keys as "Never deactivate" or "Always deactivate" assets when you enable the auto remediation in Workbench.

{% hint style="info" %}
If our SOC identifies an access key that must be deactivated and you have created either an allow ("Always deactivate") or deny ("Never deactivate") list in Workbench, any access keys falling outside of those parameters are assigned to you as actions rather than being deactivated automatically.
{% endhint %}

## Step 4: Return to the Main Setup Guide <a href="#h_01jgycgywj4m9tc7j443dvsmf1" id="h_01jgycgywj4m9tc7j443dvsmf1"></a>

Your AWS GuardDuty device is now ready for the Deactivate Access Keys auto remediation. You should now do one of the following:

* **If you do not need to set up any other devices for this auto remediation**, you can return to the [Enable an Auto Remediation in Workbench](/workbench-setup/auto-remediations/enable-an-auto-remediation-in-workbench.md) guide to finish Step 2 of the process.
* **If you need to set up additional devices for this auto remediation, or wish to use this device with multiple auto remediations**, be sure to [complete those setup guides as well](/workbench-setup/auto-remediations.md) before returning to the [Enable an Auto Remediation in Workbench](/workbench-setup/auto-remediations/enable-an-auto-remediation-in-workbench.md) guide to finish Step 2 of the process. *Make sure to follow the setup guide that is specific to your auto remediation, as device setup instructions are unique to each auto remediation and device.*


---

# 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/workbench-setup/auto-remediations/deactivate-access-keys/aws-guardduty-deactivate-access-keys.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.
