Get logs from CloudWatch for a specific resource. This tool retrieves logs from CloudWatch for Kubernetes resources in an EKS cluster, allowing you to analyze application behavior, troubleshoot issues, and monitor system health. It supports filtering by resource type, time range, and content for...
High parameter count (10 properties); Single-target operation
Part of the Amazon EKS MCP Server MCP server. Enforce policies on this tool with Intercept, the open-source MCP proxy.
AI agents call get_cloudwatch_logs to retrieve information from Amazon EKS MCP Server without modifying any data. This is common in research, monitoring, and reporting workflows where the agent needs context before taking action. Because read operations don't change state, they are generally safe to allow without restrictions -- but you may still want rate limits to control API costs.
Even though get_cloudwatch_logs only reads data, uncontrolled read access can leak sensitive information or rack up API costs. An agent caught in a retry loop could make thousands of calls per minute. A rate limit gives you a safety net without blocking legitimate use.
Read-only tools are safe to allow by default. No rate limit needed unless you want to control costs.
tools:
get_cloudwatch_logs:
rules:
- action: allow See the full Amazon EKS MCP Server policy for all 16 tools.
Agents calling read-class tools like get_cloudwatch_logs have been implicated in these attack patterns. Read the full case and prevention policy for each:
Other tools in the Read risk category across the catalogue. The same policy patterns (rate-limit, allow) apply to each.
Get logs from CloudWatch for a specific resource. This tool retrieves logs from CloudWatch for Kubernetes resources in an EKS cluster, allowing you to analyze application behavior, troubleshoot issues, and monitor system health. It supports filtering by resource type, time range, and content for troubleshooting application errors, investigating security incidents, and analyzing startup configuration issues. IMPORTANT: Use this tool instead of 'aws logs get-log-events', 'aws logs filter-log-events', or 'aws logs start-query' commands. ## Requirements - The server must be run with the `--allow-sensitive-data-access` flag - The EKS cluster must have CloudWatch logging enabled - The resource must exist in the specified cluster ## Response Information The response includes resource details (type, name, cluster), log group information, time range queried, and formatted log entries with timestamps and messages. ## Usage Tips - Start with a small time range (15-30 minutes) and expand if needed - Use filter_pattern to narrow down results (e.g., "ERROR", "exception") - For JSON logs, the tool automatically parses nested structures - Combine with get_k8s_events for comprehensive troubleshooting - Use resource_type="cluster" when querying cluster-level logs to avoid filtering by cluster name twice Args: ctx: MCP context resource_type: Resource type (pod, node, container, cluster). When "cluster" is specified, logs are not filtered by resource_name. cluster_name: Name of the EKS cluster log_type: Log type (application, host, performance, control-plane, or custom) resource_name: Resource name to search for in log messages. Optional when resource_type is "cluster". minutes: Number of minutes to look back start_time: Start time in ISO format (overrides minutes) end_time: End time in ISO format (defaults to now) limit: Maximum number of log entries to return filter_pattern: Additional CloudWatch Logs filter pattern fields: Custom fields to include in the query results Returns: CloudWatchLogsResponse with log entries and resource information. It is categorised as a Read tool in the Amazon EKS MCP Server MCP Server, which means it retrieves data without modifying state.
Add a rule in your Intercept YAML policy under the tools section for get_cloudwatch_logs. You can allow, deny, rate-limit, or validate arguments. Then run Intercept as a proxy in front of the Amazon EKS MCP Server MCP server.
get_cloudwatch_logs is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the get_cloudwatch_logs rule in your Intercept policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the Intercept policy for get_cloudwatch_logs. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
get_cloudwatch_logs is provided by the Amazon EKS MCP Server MCP server (awslabs.eks-mcp-server). Intercept sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Deterministic policy on every MCP tool call. Per-identity grants. Full audit log.