Kiro records AWS CloudTrail events when it lists or calls Kiro service MCP tools, such as web search. Security and audit teams can see who made the request, which tool was called, when it ran, and whether it failed. These events do not cover MCP servers that users or administrators add to Kiro. Events replace tool arguments with a placeholder and do not include tool results.
Kiro records privileged tool calls as management events without setup. To record tool listings and read-only tool calls, add a data event selector. This logging does not change how developers use Kiro.
Kiro records each supported MCP request as an AwsMcpEvent from codewhisperer-mcp.amazonaws.com.
| Activity | eventName | eventCategory | readOnly | Default trail settings |
|---|---|---|---|---|
| List available tools | ListTools | Data | true | Not logged |
| Call a read-only tool | CallReadOnlyTool | Data | true | Not logged |
| Call any other tool | CallPrivilegedTool | Management | false | Logged |
Kiro records a tool call as CallPrivilegedTool when it cannot determine the tool's classification. This happens when Kiro rejects the request before it reaches the tool, for example because authentication failed, the request was throttled, or the request was invalid. It also happens when the tool name is not recognized. After Kiro identifies the tool, the event name follows the tool's classification even if the call fails. A denied call to a read-only tool is therefore recorded as a CallReadOnlyTool data event with errorCode set to AccessDenied.
CloudTrail event history includes the last 90 days of management events. It does not include data events. To keep data events, add an advanced event selector to a trail or CloudTrail Lake event data store.
| Need | CloudTrail feature |
|---|---|
| Review recent privileged calls without setup | Event history |
| Keep an ongoing record in Amazon S3 | Trail |
| Query events across accounts and AWS Regions | CloudTrail Lake |
Data events are not logged by default. These steps add Kiro data events to a trail that already uses advanced event selectors.
-
In the trail's home Region, save its current selectors:
bashaws cloudtrail get-event-selectors \ --trail-name <trail-name> \ --region <trail-home-region> \ > current-selectors.json -
Open
current-selectors.json. If it containsEventSelectorsinstead ofAdvancedEventSelectors, follow the CloudTrail guide for advanced event selectors before continuing. -
Create
advanced-selectors.jsonas a JSON array. Copy every object from the currentAdvancedEventSelectorslist into it. -
Add this object to the array:
json{ "Name": "Log Kiro MCP data events", "FieldSelectors": [ { "Field": "eventCategory", "Equals": ["Data"] }, { "Field": "resources.type", "Equals": ["AWS::CodeWhisperer::Profile"] }, { "Field": "eventSource", "Equals": ["codewhisperer-mcp.amazonaws.com"] } ] } -
Apply the full array:
bashaws cloudtrail put-event-selectors \ --trail-name <trail-name> \ --region <trail-home-region> \ --advanced-event-selectors file://advanced-selectors.json
- Run
get-event-selectorsagain. Confirm that the output includesLog Kiro MCP data eventsand every selector you kept. - As a user whose Kiro profile has Web Tools enabled, ask Kiro to search the web for current information. Confirm that its response cites web sources. For this setting, see Settings.
- Open the trail's Amazon S3 bucket. Find a
CallReadOnlyToolevent witheventSourceset tocodewhisperer-mcp.amazonaws.com.
CloudTrail usually delivers logs within about five minutes, but delivery can take longer. If no event appears, confirm that the Kiro profile is in US East (N. Virginia) or Europe (Frankfurt). Also confirm that the trail records that Region and still has the Kiro selector.
Kiro events use the CloudTrail record format with an added mcpEventDetails field. The following fields help you audit tool use:
| Field | What it shows |
|---|---|
userIdentity | The identity that made the request |
sourceIPAddress | The request's source IP address |
userAgent | The Kiro client that made the request |
requestParameters | The JSON-RPC version and id, MCP method, and tool name in params.name |
resources | The Kiro profile ARN |
mcpEventDetails | sessionId, toolName, and executionTimeMs |
errorCode and errorMessage | Why a request did not complete. ClientCancelled means the client stopped reading the response |
For tool calls, requestParameters.params.arguments is always HIDDEN_DUE_TO_SECURITY_REASONS. Kiro does not include tool results in the event. mcpEventDetails.sessionId matches the event's requestID.
Kiro does not record a request that is rejected as malformed before processing, or one that does not name a usable Kiro profile. If authentication fails, userIdentity.type is Unknown. In that event, treat its account and profile values as unverified request data.
To review the full event format, see CloudTrail record contents.
Logging Kiro tool calls with AWS CloudTrail