Back to Checks
aws

Root account has no active access keys

iam_no_root_access_key
Service: iamSeverity: critical
OfficialBuilt-inVerified
Categories:identity-access
Resource Type:AwsIamAccessKey

AWS root user is evaluated for active access keys. It identifies whether the root identity has one or two programmatic credentials and notes when organization-level root credential management is present.

Risk

Root access keys provide unrestricted API access. If exposed or misused, attackers can:

  • Turn off logging and alter policies (integrity)
  • Read or export data (confidentiality)
  • Delete resources and lock out admins (availability) Long-lived keys can persist and may bypass console-only MFA.

Run this check with Prowler

Run in Prowler Cloud
Run
prowler aws --checks iam_no_root_access_key

Recommendation

Delete and prohibit root access keys. Use IAM roles and temporary credentials with least privilege for all automation. Enable MFA on root, limit root to break-glass use, and continuously monitor for any new root keys. Where applicable, apply organization-wide controls to enforce this.

Remediation

Other

1Sign in to the AWS Management Console as the root user
2Open My Security Credentials (account menu) or go to https://console.aws.amazon.com/iam/home?#/security_credentials
3Expand Access keys
4For each key with Status "Active", choose Delete and confirm
5Verify no Active keys remain for the root user

Check Code

from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.iam.iam_client import iam_client


class iam_no_root_access_key(Check):
    def execute(self) -> Check_Report_AWS:
        findings = []

        if iam_client.credential_report:
            for user in iam_client.credential_report:
                if user["user"] == "<root_account>":
                    password_enabled = user["password_enabled"] == "true"
                    access_key_1_active = user["access_key_1_active"] == "true"
                    access_key_2_active = user["access_key_2_active"] == "true"

                    # Only report if root actually has credentials
                    if password_enabled or access_key_1_active or access_key_2_active:
                        report = Check_Report_AWS(
                            metadata=self.metadata(), resource=user
                        )
                        report.region = iam_client.region
                        report.resource_id = user["user"]
                        report.resource_arn = user["arn"]

                        # Check if organization manages root credentials
                        org_managed = (
                            iam_client.organization_features is not None
                            and "RootCredentialsManagement"
                            in iam_client.organization_features
                        )

                        if not access_key_1_active and not access_key_2_active:
                            report.status = "PASS"
                            if org_managed:
                                report.status_extended = (
                                    "Root account has password configured but no access keys. "
                                    "Consider removing individual root credentials since organizational "
                                    "root management is active."
                                )
                            else:
                                report.status_extended = (
                                    "Root account does not have access keys."
                                )
                        elif access_key_1_active and access_key_2_active:
                            report.status = "FAIL"
                            if org_managed:
                                report.status_extended = (
                                    "Root account has two active access keys "
                                    "despite organizational root management being enabled."
                                )
                            else:
                                report.status_extended = (
                                    "Root account has two active access keys."
                                )
                        else:
                            report.status = "FAIL"
                            if org_managed:
                                report.status_extended = (
                                    "Root account has one active access key "
                                    "despite organizational root management being enabled."
                                )
                            else:
                                report.status_extended = (
                                    "Root account has one active access key."
                                )
                        findings.append(report)
                    break

        return findings