aws-audit-scanner is an open-source tool designed to help users find common cost and security issues in AWS accounts. It focuses on identifying forgotten spending and default configurations that can lead to incidents. The tool runs read-only, executes locally, and covers all AWS regions.
Main capabilities include: checking whether resources that should not be public are public, whether the root account has MFA enabled, which access keys have never been used, and which resources are still being billed but unused by anyone. Each tool returns structured findings, including severity, specific resource IDs, why the issue matters, and the console and CLI steps needed to fix it, making them easy to process programmatically.
Usage is flexible: it can be integrated into code as a library, run as a CLI tool, or used as an MCP server driven by AI agents. As an MCP server, it can be added to any MCP client (such as Claude Desktop), and then the agent can audit the account. When used as a library, each tool returns a Result-shaped value ({ ok: true, findings } or { ok: false, error }) instead of throwing exceptions, so a single permission denial only affects one check. Tools use the ambient AWS credential chain, do not read their own configuration files, and do not store any data. To audit other accounts, assumeAuditRole can be used to assume a role via STS and an external ID, and sessions are designed to be short-lived.
Read-only behavior is guaranteed at three levels: the code imports only Describe*, List*, and Get* commands; the IAM policy is published in the whatsinmycloud/readonly-role repository; and the trust policy restricts the role so it can only be assumed by a specific role in a specific account and requires an external ID issued by the server.
Regarding coverage: pagination is handled, every list call follows continuation tokens, and paginators fail closed (for example, if a token repeats or a response is truncated without a marker, an exception is thrown), ensuring partial lists are not mistaken for complete lists. Region discovery uses existence probing, first cheaply checking all enabled regions, then deeply scanning regions that have resources. Costs are estimates; EBS pricing is approximated based on volume type and size and is intended only for prioritization, not billing. Not yet covered: Lambda, ElastiCache, NAT gateways, unassociated Elastic IPs, and old snapshots.
Tests use aws-sdk-client-mock, run offline, and do not touch real accounts. Welcomeissues and pull requests, but new scanning tools need a function that returns ScanResult, registration in src/index.ts, and tests, and must maintain the absolute read-only guarantee.
WhatsInMyCloud runs this scanner and adds prioritized plain-English reports (weekly monitoring is planned, with a waitlist); that layer is not open source. If you do not want to run it yourself, you can use the hosted version; if you want to read the code and run it locally, use this repository. The license is MIT.