accessanalyzer_list_analyzers
List all IAM Access Analyzer analyzers in a specified AWS region and return results in JSON format for easier access management and region-specific insights.
Instructions
List all IAM Access Analyzer analyzers in the specified region.
Parameters:
aws_region (str): The AWS region - use 'us-east-1' if not specified.
Returns:
str: JSON-formatted list of analyzers.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aws_region | Yes |
Implementation Reference
- server.py:932-946 (handler)The handler function for the 'accessanalyzer_list_analyzers' tool. It is registered via the @mcp.tool() decorator and implements the logic to list IAM Access Analyzer analyzers in the given AWS region using the boto3 client, returning a JSON-formatted list.@mcp.tool() async def accessanalyzer_list_analyzers(aws_region: str) -> str: """ List all IAM Access Analyzer analyzers in the specified region. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. Returns: str: JSON-formatted list of analyzers. """ client = boto3.client('accessanalyzer', region_name=aws_region) response = client.list_analyzers() analyzers = response.get('analyzers', []) return json.dumps(analyzers, indent=2, cls=DateTimeEncoder)