Skip to main content
Glama

aws_whoami

Identify the AWS identity and account context currently in use to verify permissions and ensure proper access control for security audits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authNo

Implementation Reference

  • Handler function for the 'aws_whoami' tool, decorated with @mcp.tool for registration. Retrieves AWS account, ARN, and user ID using STS GetCallerIdentity.
    @mcp.tool def aws_whoami(auth: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: session = build_boto3_session(auth) sts = session.client("sts", region_name=session.region_name or "us-east-1") ident = sts.get_caller_identity() return { "account": ident.get("Account"), "arn": ident.get("Arn"), "user_id": ident.get("UserId"), }
  • Registration of the 'aws_whoami' tool using FastMCP's @mcp.tool decorator.
    @mcp.tool

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/oldcoder01/aws-mcp-audit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server