You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this related to an existing feature request or issue?
No response
Summary
This RFC proposes a new aws-cloudtrail plugin that provides deep CloudTrail-specific workflows for security incident investigation, compliance auditing, IAM activity analysis, and change tracking. The plugin integrates the awslabs.cloudtrail-mcp-server and awslabs.aws-knowledge-mcp-server, with one skill and four reference files covering the core security and compliance use cases.
Use case
Security engineers, DevOps teams, and compliance auditors need to investigate incidents, audit changes, and track IAM activity across AWS accounts. Today, this requires manually querying CloudTrail via the console or CLI, correlating events across time windows, and building investigation reports by hand.
Compliance auditing: Audit IAM changes, encryption compliance, network security modifications, and root account usage against frameworks like CIS, SOC 2, PCI-DSS
IAM analysis: Detect privilege escalation patterns, track permission changes, audit access key rotation, and monitor cross-account role assumptions
Change tracking: Build chronological change logs for any AWS resource, identify who changed what and when
Before / After:
Before (without the plugin):
User: "Who deleted the production S3 bucket?"
Agent: You can check CloudTrail in the AWS Console. Go to Event History, filter by event name DeleteBucket, and look for the resource name. You might also want to check the time range...
After (with aws-cloudtrail):
User: "Who deleted the production S3 bucket?"
Agent: Investigating S3 bucket deletion...
Time (UTC)
Principal
Action
Resource
Source IP
Verdict
2026-04-07T14:23:11Z
arn:aws:iam::123456789012:user/jdoe
DeleteBucket
my-prod-bucket
198.51.100.42
🔴
User jdoe deleted bucket my-prod-bucket from IP 198.51.100.42 at 2:23 PM UTC. This IP is outside your known corporate range. Checking for other activity by this user...
[Additional actions by jdoe in the same time window...]
Recommendation: Disable jdoe's access key immediately and investigate the source IP.
CloudTrail event lookup, Lake SQL analytics, event data store management
Required
awslabs.aws-knowledge-mcp-server
http
AWS security best practices and service documentation
Required
awslabs.cloudtrail-mcp-server is the primary server — it provides all CloudTrail query capabilities (lookup_events, lake_query, list_event_data_stores, get_query_status, get_query_results). The knowledge server is invoked when the agent needs AWS security best practices or service-specific event documentation.
Skill design
The SKILL.md follows progressive disclosure:
Initial load (~117 lines): Workflow, data source selection guide, MCP server usage, investigation type routing, defaults, and error handling
On-demand references (4 files, all under 100 lines): Loaded only when the agent needs deep domain knowledge for a specific workflow
Workflow
Scope — Identify the investigation type (security incident, compliance audit, IAM analysis, change tracking) and time window
Investigate — Query CloudTrail events using the appropriate tool (lookup_events for recent events, lake_query for complex analytics)
Analyze — Correlate findings, identify patterns and anomalies
Report — Present structured findings with timestamps, principals, affected resources, and recommendations
Defaults
Setting
Default
How to Override
Time window
Last 24 hours
State: "check the last 7 days" or "since March 1st"
Event scope
Management events (default CloudTrail)
State: "include data events" or "check S3 object access"
Data source
lookup_events first; escalate to lake_query for aggregation or >90 days
State: "use CloudTrail Lake" or "run a SQL query"
Output format
Markdown findings table: Time / Principal / Action / Resource / Source IP / Verdict
—
Verdict markers
🔴 Malicious, ⚠️ Suspicious, ✅ Expected
—
Compliance framework
None (general audit)
State: "audit against CIS" or "check SOC 2 controls"
Lake query behavior
Check list_event_data_stores before querying; use LIMIT and eventTime filters
—
Out of scope
Real-time alerting: This plugin queries historical events; it does not set up CloudTrail alarms or EventBridge rules
CloudTrail configuration: The plugin does not create trails, enable logging, or modify CloudTrail settings
Remediation: The plugin identifies issues and recommends actions but does not automatically remediate (e.g., does not disable access keys)
Non-CloudTrail data sources: CloudWatch Logs, VPC Flow Logs, GuardDuty findings are not in scope
Potential challenges
CloudTrail Lake availability: Not all accounts have CloudTrail Lake enabled. Mitigation: SKILL.md instructs the agent to fall back to lookup_events and suggest enabling Lake for advanced analytics.
Event History limitations: lookup_events only covers the last 90 days of management events. Mitigation: SKILL.md documents this limitation and routes to Lake queries when longer time ranges are needed.
Data event logging: S3 object-level and DynamoDB item-level events require explicit data event logging configuration. Mitigation: Reference files note when data events are required and suggest enabling them.
Reference file size: Security investigation and Lake query reference files cover many patterns. Mitigation: Files load only when the relevant investigation type is detected; SKILL.md stays well under 300 lines.
Complements deploy-on-aws: After deploying infrastructure, use aws-cloudtrail to audit the changes made and verify security posture
Alternative solutions
Service-centric model (per RFC: Plugin Granularity and Organization for awslabs/agent-plugins #56): A pure "CloudTrail tools" plugin wrapping the MCP server without workflow guidance. This would be too thin — the value is in the structured investigation playbooks, not just API access.
Manual MCP server setup: Users could configure awslabs.cloudtrail-mcp-server directly and write their own prompts. The plugin adds value through curated skill descriptions, progressive-disclosure reference files, and pre-built investigation workflows that guide the agent through complex security analysis tasks.
Is this related to an existing feature request or issue?
No response
Summary
This RFC proposes a new aws-cloudtrail plugin that provides deep CloudTrail-specific workflows for security incident investigation, compliance auditing, IAM activity analysis, and change tracking. The plugin integrates the
awslabs.cloudtrail-mcp-serverandawslabs.aws-knowledge-mcp-server, with one skill and four reference files covering the core security and compliance use cases.Use case
Security engineers, DevOps teams, and compliance auditors need to investigate incidents, audit changes, and track IAM activity across AWS accounts. Today, this requires manually querying CloudTrail via the console or CLI, correlating events across time windows, and building investigation reports by hand.
Key use cases:
Before / After:
Before (without the plugin):
After (with aws-cloudtrail):
Proposal
Plugin structure
MCP servers
awslabs.cloudtrail-mcp-serverawslabs.aws-knowledge-mcp-serverawslabs.cloudtrail-mcp-serveris the primary server — it provides all CloudTrail query capabilities (lookup_events,lake_query,list_event_data_stores,get_query_status,get_query_results). The knowledge server is invoked when the agent needs AWS security best practices or service-specific event documentation.Skill design
The SKILL.md follows progressive disclosure:
Workflow
lookup_eventsfor recent events,lake_queryfor complex analytics)Defaults
lookup_eventsfirst; escalate tolake_queryfor aggregation or >90 dayslist_event_data_storesbefore querying; useLIMITandeventTimefiltersOut of scope
Potential challenges
lookup_eventsand suggest enabling Lake for advanced analytics.lookup_eventsonly covers the last 90 days of management events. Mitigation: SKILL.md documents this limitation and routes to Lake queries when longer time ranges are needed.Dependencies and Integrations
Dependencies (all from AWS Labs):
awslabs.cloudtrail-mcp-server— CloudTrail event lookup and Lake analyticsawslabs.aws-knowledge-mcp-server— AWS documentation and best practicesIntegration with existing plugins:
deploy-on-aws: After deploying infrastructure, useaws-cloudtrailto audit the changes made and verify security postureAlternative solutions
Service-centric model (per RFC: Plugin Granularity and Organization for awslabs/agent-plugins #56): A pure "CloudTrail tools" plugin wrapping the MCP server without workflow guidance. This would be too thin — the value is in the structured investigation playbooks, not just API access.
Manual MCP server setup: Users could configure
awslabs.cloudtrail-mcp-serverdirectly and write their own prompts. The plugin adds value through curated skill descriptions, progressive-disclosure reference files, and pre-built investigation workflows that guide the agent through complex security analysis tasks.