> For the complete documentation index, see [llms.txt](https://docs.stoik.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stoik.io/cyber-best-practices/vulnerability-remediation-guides/cloud-scan/amazon-web-services-aws.md).

# Amazon Web Services (AWS)

## Root Account Without MFA

**Severity: Critical**

### What it means

The AWS **root account** has unrestricted access to everything in your AWS account: billing, all services, all data. It is the single most powerful credential in your entire cloud setup. Without MFA, a compromised root password means complete takeover.

### How to fix

1. Sign in to the [AWS Console](https://console.aws.amazon.com/) as root.
2. Go to `IAM` > `Dashboard` > `Activate MFA on your root account`.
3. Click `Manage MFA` > `Activate MFA`.
4. Choose `Virtual MFA device` (recommended: use a hardware key like YubiKey for maximum security).
5. Scan the QR code with your authenticator app.
6. Enter two consecutive codes and click `Assign MFA`.

After enabling MFA, follow AWS best practices:

* **Never use the root account for daily tasks.** Create IAM users or use IAM Identity Center instead.
* Store the root credentials in a secure, offline location (safe, password manager).

## Root Account Used Recently

**Severity: High**

### What it means

The root account has been used to log in within the last 90 days. Like the built-in Administrator in Active Directory, the root account should be reserved for emergencies only (e.g., account recovery, billing changes). Day-to-day work should use IAM users or roles with appropriate permissions.

### How to fix

1. Create **IAM users** or use **IAM Identity Center (SSO)** for daily administration.
2. Assign only the permissions each person needs (principle of least privilege).
3. Stop using the root account for routine tasks.
4. The alert will clear after 90 days of inactivity on the root account.

## IAM Users Without MFA

**Severity: Medium**

### What it means

One or more IAM users can log in to the AWS Console without MFA. If their password is compromised, the attacker gets full access to whatever that user can do in AWS.

### How to fix

1. Go to `IAM` > `Users` > select the user.
2. Go to the `Security credentials` tab.
3. Under `Multi-factor authentication (MFA)`, click `Manage`.
4. Assign an MFA device.

To enforce MFA for all users, create an IAM policy that denies all actions unless MFA is present:

1. Go to `IAM` > `Policies` > `Create policy`.
2. Use the [AWS MFA enforcement policy](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_aws_my-sec-creds-self-manage-mfa-only.html) template.
3. Attach it to all user groups.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stoik.io/cyber-best-practices/vulnerability-remediation-guides/cloud-scan/amazon-web-services-aws.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
