Logging Amazon CloudWatch API and console operations with AWS CloudTrail
Amazon CloudWatch, CloudWatch Synthetics, CloudWatch RUM, Amazon Q Developer operational investigations, Network Flow Monitor, and Internet Monitor are integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service. CloudTrail captures API calls made by or on behalf of your AWS account. The captured calls include calls from the CloudWatch console and code calls to CloudWatch API operations. Using the information collected by CloudTrail, you can determine the request that was made to CloudWatch, the IP address from which the request was made, when it was made, and additional details.
Every event or log entry contains information about who generated the request. The identity information helps you determine the following:
-
Whether the request was made with root user or user credentials.
-
Whether the request was made on behalf of an IAM Identity Center user.
-
Whether the request was made with temporary security credentials for a role or federated user.
-
Whether the request was made by another AWS service.
CloudTrail is active in your AWS account when you create the account and you automatically have access to the CloudTrail Event history. The CloudTrail Event history provides a viewable, searchable, downloadable, and immutable record of the past 90 days of recorded management events in an AWS Region. For more information, see Working with CloudTrail Event history in the AWS CloudTrail User Guide. There are no CloudTrail charges for viewing the Event history.
For an ongoing record of events in your AWS account past 90 days, create a trail or a CloudTrail Lake event data store.
- CloudTrail trails
A trail enables CloudTrail to deliver log files to an Amazon S3 bucket. All trails created using the AWS Management Console are multi-Region. You can create a single-Region or a multi-Region trail by using the AWS CLI. Creating a multi-Region trail is recommended because you capture activity in all AWS Regions in your account. If you create a single-Region trail, you can view only the events logged in the trail's AWS Region. For more information about trails, see Creating a trail for your AWS account and Creating a trail for an organization in the AWS CloudTrail User Guide.
You can deliver one copy of your ongoing management events to your Amazon S3 bucket at no charge from CloudTrail by creating a trail, however, there are Amazon S3 storage charges. For more information about CloudTrail pricing, see AWS CloudTrail Pricing
. For information about Amazon S3 pricing, see Amazon S3 Pricing . - CloudTrail Lake event data stores
CloudTrail Lake lets you run SQL-based queries on your events. CloudTrail Lake converts existing events in row-based JSON format to Apache ORC
format. ORC is a columnar storage format that is optimized for fast retrieval of data. Events are aggregated into event data stores, which are immutable collections of events based on criteria that you select by applying advanced event selectors. The selectors that you apply to an event data store control which events persist and are available for you to query. For more information about CloudTrail Lake, see Working with AWS CloudTrail Lake in the AWS CloudTrail User Guide. CloudTrail Lake event data stores and queries incur costs. When you create an event data store, you choose the pricing option you want to use for the event data store. The pricing option determines the cost for ingesting and storing events, and the default and maximum retention period for the event data store. For more information about CloudTrail pricing, see AWS CloudTrail Pricing
.
For information about CloudWatch Logs API calls that are logged in CloudTrail, see CloudWatch Logs information in CloudTrail.
Topics
CloudWatch information in CloudTrail
CloudWatch supports logging the following actions as events in CloudTrail log files:
Example: CloudWatch log file entries
The following example shows a CloudTrail log entry that demonstrates the PutMetricAlarm action.
{ "Records": [{ "eventVersion": "1.01", "userIdentity": { "type": "Root", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::123456789012:root", "accountId": "123456789012", "accessKeyId": "EXAMPLE_KEY_ID" }, "eventTime": "2014-03-23T21:50:34Z", "eventSource": "monitoring.amazonaws.com", "eventName": "PutMetricAlarm", "awsRegion": "us-east-1", "sourceIPAddress": "127.0.0.1", "userAgent": "aws-sdk-ruby2/2.0.0.rc4 ruby/1.9.3 x86_64-linux Seahorse/0.1.0", "requestParameters": { "threshold": 50.0, "period": 60, "metricName": "CloudTrail Test", "evaluationPeriods": 3, "comparisonOperator": "GreaterThanThreshold", "namespace": "AWS/CloudWatch", "alarmName": "CloudTrail Test Alarm", "statistic": "Sum" }, "responseElements": null, "requestID": "29184022-b2d5-11e3-a63d-9b463e6d0ff0", "eventID": "b096d5b7-dcf2-4399-998b-5a53eca76a27" }, ..additional entries ] }
The following log file entry shows that a user called the CloudWatch Events
PutRule action.
{ "eventVersion":"1.03", "userIdentity":{ "type":"Root", "principalId":"123456789012", "arn":"arn:aws:iam::123456789012:root", "accountId":"123456789012", "accessKeyId":"AKIAIOSFODNN7EXAMPLE", "sessionContext":{ "attributes":{ "mfaAuthenticated":"false", "creationDate":"2015-11-17T23:56:15Z" } } }, "eventTime":"2015-11-18T00:11:28Z", "eventSource":"events.amazonaws.com", "eventName":"PutRule", "awsRegion":"us-east-1", "sourceIPAddress":"AWS Internal", "userAgent":"AWS CloudWatch Console", "requestParameters":{ "description":"", "name":"cttest2", "state":"ENABLED", "eventPattern":"{\"source\":[\"aws.ec2\"],\"detail-type\":[\"EC2 Instance State-change Notification\"]}", "scheduleExpression":"" }, "responseElements":{ "ruleArn":"arn:aws:events:us-east-1:123456789012:rule/cttest2" }, "requestID":"e9caf887-8d88-11e5-a331-3332aa445952", "eventID":"49d14f36-6450-44a5-a501-b0fdcdfaeb98", "eventType":"AwsApiCall", "apiVersion":"2015-10-07", "recipientAccountId":"123456789012" }
The following log file entry shows that a user called the CloudWatch Logs
CreateExportTask action.
{ "eventVersion": "1.03", "userIdentity": { "type": "IAMUser", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::123456789012:user/someuser", "accountId": "123456789012", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "userName": "someuser" }, "eventTime": "2016-02-08T06:35:14Z", "eventSource": "logs.amazonaws.com", "eventName": "CreateExportTask", "awsRegion": "us-east-1", "sourceIPAddress": "127.0.0.1", "userAgent": "aws-sdk-ruby2/2.0.0.rc4 ruby/1.9.3 x86_64-linux Seahorse/0.1.0", "requestParameters": { "destination": "yourdestination", "logGroupName": "yourloggroup", "to": 123456789012, "from": 0, "taskName": "yourtask" }, "responseElements": { "taskId": "15e5e534-9548-44ab-a221-64d9d2b27b9b" }, "requestID": "1cd74c1c-ce2e-12e6-99a9-8dbb26bd06c9", "eventID": "fd072859-bd7c-4865-9e76-8e364e89307c", "eventType": "AwsApiCall", "apiVersion": "20140328", "recipientAccountId": "123456789012" }
CloudWatch data events in CloudTrail
CloudTrail captures API activities for three groups of CloudWatch data plane operations. The first
group is the metric data-plane APIs:
GetMetricData,
GetMetricWidgetImage,
PutMetricData,
GetMetricStatistics, and
ListMetrics. The second group is the Prometheus-compatible query
APIs for Prometheus Query Language (PromQL): QueryMetrics,
GetSeries, and GetLabels. For more information about these
APIs, see Prometheus-compatible APIs.
The third group is the Amazon CloudWatch Profiles operations: profile ingestion through the
OpenTelemetry Protocol (OTLP) endpoint and the profile query operations. For more
information, see Profiles in Amazon CloudWatch.
CloudTrail logs each data event under one of two CloudWatch data resource types, as shown in the following table.
| Data event | Data resource type |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CloudTrail records QueryMetrics, GetSeries, and
GetLabels query requests with readOnly set to
true and an eventSource of
monitoring.amazonaws.com. To log PromQL query requests, enable data
events for the CloudWatch dataset resource type.
CloudTrail records the requests that send metrics and profile data to CloudWatch through the
OpenTelemetry Protocol (OTLP) endpoint, and Amazon CloudWatch Profiles query requests, as
data events under the AWS::CloudWatch::Dataset resource type. To log
these events, enable data events with an advanced event selector on this resource
type.
CloudTrail records OTLP metric requests as PutMetricData events under the
AWS::CloudWatch::Dataset resource type, not
AWS::CloudWatch::Metric. These events include an
additionalEventData field with the value
{"protocol": "OTLP"}.
Profile data that you send to the OTLP endpoint is recorded as
PutOtelProfiles events with readOnly set to
false. CloudTrail doesn't record the profile data, so
requestParameters is null. Profile query requests are
recorded with readOnly set to true. Their
requestParameters field contains the query's profile type, label
selector, and time range.
Query events include label selectors, so don't put sensitive values in profile labels. CloudTrail doesn't log trace and span IDs.
The cloudwatch:PutProfileRecords permission covers the ingestion
event. The cloudwatch:GetProfileRecords permission covers every query
event.
Data events, also known as data plane operations, give you insight into the resource operations performed on or within a resource. Data events are often high-volume activities.
By default, CloudTrail doesn't log data events. The CloudTrail Event history doesn't record data events.
Additional charges apply for data events. For more information about CloudTrail pricing, see
AWS CloudTrail Pricing
You can log data events for the CloudWatch resource types by using the CloudTrail console, AWS CLI, or CloudTrail API operations. For more information about how to log data events, see Logging data events with the AWS Management Console and Logging data events with the AWS Command Line Interface in the AWS CloudTrail User Guide.
Data plane events can be filtered by resource type. Because there are additional costs for using data events in CloudTrail, filtering by resource allows you to have more control over what you log and pay for.
Using the information that CloudTrail collects, you can identify the API request, the IP address of the requester, the requester's identity, and the date and time of the request. Logging these data events with CloudTrail helps you enable operational and risk auditing, governance, and compliance of your AWS account.
When you view the GetMetricData events in CloudTrail, you might see more calls than the calls that you initiated.
This is because CloudWatch logs events to CloudTrail for GetMetricData actions that are initiated by internal components. For example, you'll
see GetMetricData calls initiated by CloudWatch dashboards to refresh widget data, and GetMetricData calls initiated by a
monitoring account to retrieve data from a source account,
in cross-account observability. These internally-initiated calls don't incur CloudWatch charges, but they do count toward the number of events
logged in CloudTrail, and CloudTrail charges according to the number of events logged.
The following is an example of a CloudTrail event for a GetMetricData operation.
{ "eventVersion": "1.09", "userIdentity": { "type": "IAMUser", "principalId": "AIDA2NYTR2EPCTNY7AF3L", "arn": "arn:aws:iam::111122223333:user/admin", "accountId": "111122223333", "accessKeyId": "EXAMPLE1234567890", "userName": "admin" }, "eventTime": "2024-05-08T16:20:34Z", "eventSource": "monitoring.amazonaws.com", "eventName": "GetMetricData", "awsRegion": "us-east-1", "sourceIPAddress": "99.45.3.7", "userAgent": "aws-cli/2.13.23 Python/3.11.5 Darwin/23.4.0 exe/x86_64 prompt/off command/cloudwatch.get-metric-data", "requestParameters": { "metricDataQueries": [{ "id": "e1", "expression": "m1 / m2", "label": "ErrorRate" }, { "id": "m1", "metricStat": { "metric": { "namespace": "CWAgent", "metricName": "disk_used_percent", "dimensions": [{ "name": "LoadBalancerName", "value": "EXAMPLE4623a5cb6a7384c5229" }] }, "period": 300, "stat": "Sum", "unit": "Count" }, "returnData": false }, { "id": "m2", "metricStat": { "metric": { "namespace": "CWAgent", "metricName": "disk_used_percent", "dimensions": [{ "name": "LoadBalancerName", "value": "EXAMPLE4623a5cb6a7384c5229" }] }, "period": 300, "stat": "Sum" }, "returnData": true } ], "startTime": "Apr 19, 2024, 4:00:00 AM", "endTime": "May 8, 2024, 4:30:00 AM" }, "responseElements": null, "requestID": "EXAMPLE-57ac-47d5-938c-f5917c6799d5", "eventID": "EXAMPLE-211c-404b-b13d-36d93c8b4fbf", "readOnly": true, "resources": [{ "type": "AWS::CloudWatch::Metric" }], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "111122223333", "eventCategory": "Data", "tlsDetails": { "tlsVersion": "TLSv1.3", "cipherSuite": "TLS_AES_128_GCM_SHA256", "clientProvidedHostHeader": "monitoring.us-east-1.amazonaws.com" } }
The following is an example of a CloudTrail event for a PutMetricData operation.
{ "eventVersion": "1.11", "userIdentity": { "type": "AssumedRole", "principalId": "111122223333:example.amazon.com", "arn": "arn:aws:sts::111122223333:assumed-role/cloudwatch.full.access/example.amazon.com", "accountId": "111122223333", "accessKeyId": "EXAMPLE1234567890", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROA3FLD4LJVPWYJ6BCNM", "arn": "arn:aws:iam::111122223333:role/cloudwatch.full.access", "accountId": "111122223333", "userName": "cloudwatch.full.access" }, "attributes": { "creationDate": "2025-06-19T23:19:50Z", "mfaAuthenticated": "false" } } }, "eventTime": "2025-06-19T23:51:04Z", "eventSource": "monitoring.amazonaws.com", "eventName": "PutMetricData", "awsRegion": "us-east-1", "sourceIPAddress": "AWS Internal", "userAgent": "AWS Internal", "requestParameters": { "namespace": "CloudTrailTests", "metricData": [ { "metricName": "CloudTrailPutMetricDataTest", "dimensions": [ { "name": "TestDimName", "value": "TestDimValue" } ] } ] }, "responseElements": null, "requestID": "877db913-2620-4929-97f3-f3c93c6f689b", "eventID": "0c0c4516-75f4-4b27-8a83-213821a96a2b", "readOnly": false, "resources": [ { "type": "AWS::CloudWatch::Metric" } ], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "111122223333", "eventCategory": "Data", "tlsDetails": { "tlsVersion": "TLSv1.3", "cipherSuite": "TLS_AES_128_GCM_SHA256", "clientProvidedHostHeader": "monitoring.us-east-1.amazonaws.com" } }
The following is an example of a CloudTrail event for a PutMetricData operation for metrics that were sent using the OpenTelemetry Protocol (OTLP).
{ "eventVersion": "1.11", "userIdentity": { "type": "AssumedRole", "principalId": "AROA123456789EXAMPLE:i-EXAMPLE0123456789", "arn": "arn:aws:sts::111122223333:assumed-role/CloudWatchAgentServerRole/i-EXAMPLE0123456789", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROA123456789EXAMPLE", "arn": "arn:aws:iam::111122223333:role/CloudWatchAgentServerRole", "accountId": "111122223333", "userName": "CloudWatchAgentServerRole" }, "attributes": { "creationDate": "2026-10-19T11:11:36Z", "mfaAuthenticated": "false" } } }, "eventTime": "2026-10-19T12:40:24Z", "eventSource": "monitoring.amazonaws.com", "eventName": "PutMetricData", "awsRegion": "us-east-1", "sourceIPAddress": "192.0.2.1", "userAgent": "CWAgent/1.300073.0 (go1.26; linux; amd64) inputs:(otlp) aws-sdk-go-v2/1.36.3", "requestParameters": null, "responseElements": null, "additionalEventData": { "protocol": "OTLP" }, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "readOnly": false, "resources": [ { "type": "AWS::CloudWatch::Dataset", "ARN": "arn:aws:cloudwatch:us-east-1:111122223333:dataset/default" } ], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "111122223333", "eventCategory": "Data", "tlsDetails": { "tlsVersion": "TLSv1.3", "cipherSuite": "TLS_AES_128_GCM_SHA256", "clientProvidedHostHeader": "monitoring.us-east-1.amazonaws.com" } }
The following is an example of a CloudTrail event for a QueryMetrics (PromQL) operation.
{ "eventVersion": "1.11", "userIdentity": { "type": "IAMUser", "principalId": "AIDACKCEVSQ6C2EXAMPLE", "arn": "arn:aws:iam::111122223333:user/janedoe", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "userName": "janedoe" }, "eventTime": "2026-06-05T19:37:25Z", "eventSource": "monitoring.amazonaws.com", "eventName": "QueryMetrics", "awsRegion": "us-east-1", "sourceIPAddress": "203.0.113.7", "userAgent": "awscurl/0.36", "requestParameters": { "path": "/api/v1/query", "query": "sum({\"http.server.active_requests\"})" }, "responseElements": null, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "readOnly": true, "resources": [{ "type": "AWS::CloudWatch::Dataset" }], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "111122223333", "eventCategory": "Data", "tlsDetails": { "tlsVersion": "TLSv1.3", "cipherSuite": "TLS_AES_128_GCM_SHA256", "clientProvidedHostHeader": "monitoring.us-east-1.amazonaws.com" } }
The following is an example of a CloudTrail event for a PutOtelProfiles operation for profile data that was sent using the OpenTelemetry Protocol (OTLP).
{ "eventVersion": "1.11", "userIdentity": { "type": "AssumedRole", "principalId": "AROA123456789EXAMPLE:i-1234567890abcdef0", "arn": "arn:aws:sts::111122223333:assumed-role/ExampleProfilesCollectorRole/i-1234567890abcdef0", "accountId": "111122223333", "accessKeyId": "ASIAIOSFODNN7EXAMPLE" }, "eventTime": "2026-11-04T14:36:36Z", "eventSource": "monitoring.amazonaws.com", "eventName": "PutOtelProfiles", "awsRegion": "us-east-1", "sourceIPAddress": "EXAMPLE_IP_ADDRESS", "userAgent": "OpenTelemetry Collector Contrib/0.164.0 (linux/amd64)", "requestParameters": null, "responseElements": null, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE44444", "readOnly": false, "resources": [ { "type": "AWS::CloudWatch::Dataset", "ARN": "arn:aws:cloudwatch:us-east-1:111122223333:dataset/default" } ], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "111122223333", "eventCategory": "Data", "tlsDetails": { "tlsVersion": "TLSv1.3", "cipherSuite": "TLS_AES_128_GCM_SHA256", "clientProvidedHostHeader": "monitoring.us-east-1.amazonaws.com" } }
The following is an example of a CloudTrail event for a SelectProfileMergeStacktraces operation.
{ "eventVersion": "1.11", "userIdentity": { "type": "AssumedRole", "principalId": "AROA123456789EXAMPLE:example-session", "arn": "arn:aws:sts::111122223333:assumed-role/ExampleRole/example-session", "accountId": "111122223333", "accessKeyId": "ASIAIOSFODNN7EXAMPLE" }, "eventTime": "2026-11-04T14:39:49Z", "eventSource": "monitoring.amazonaws.com", "eventName": "SelectProfileMergeStacktraces", "awsRegion": "us-east-1", "sourceIPAddress": "EXAMPLE_IP_ADDRESS", "userAgent": "curl/8.5.0", "requestParameters": { "profileTypeID": "process_cpu:cpu:nanoseconds:cpu:nanoseconds", "labelSelector": "{}", "start": 1793799587000, "end": 1793803187000, "maxNodes": 4 }, "responseElements": null, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "readOnly": true, "resources": [ { "type": "AWS::CloudWatch::Dataset", "ARN": "arn:aws:cloudwatch:us-east-1:111122223333:dataset/default" } ], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "111122223333", "eventCategory": "Data", "tlsDetails": { "tlsVersion": "TLSv1.3", "cipherSuite": "TLS_AES_128_GCM_SHA256", "clientProvidedHostHeader": "monitoring.us-east-1.amazonaws.com" } }
CloudWatch Recommendations information in CloudTrail
CloudTrail logs the CloudWatch Recommendations operations as management events under the
monitoring.amazonaws.com event source, the same event source as the other
CloudWatch API operations. CloudTrail logs the following actions:
StartMonitoringAssessmentGetMonitoringAssessmentListMonitoringAssessmentsListMonitoringAssessmentResults
All four are read-only events ("readOnly": true). An assessment is not
a resource with an ARN, so the events don't include a resources field.
CloudTrail logs denied requests with their error code, so you can see who tried an operation
that they weren't authorized to perform.
An assessment reads your alarms and metrics with the forward access session of the
principal that called StartMonitoringAssessment. CloudTrail logs those reads,
such as DescribeAlarms, as separate events in your account. Their
userIdentity element identifies that principal, and their
invokedBy, sourceIPAddress, and userAgent fields
show AWS Internal. For more information, see How CloudWatch Recommendations reads your account.
Example: CloudWatch Recommendations log file entry
The following example shows a CloudTrail log entry for the
StartMonitoringAssessment action.
{ "eventVersion": "1.11", "userIdentity": { "type": "AssumedRole", "principalId": "AROAEXAMPLEID:example-session", "arn": "arn:aws:sts::111122223333:assumed-role/ExampleRole/example-session", "accountId": "111122223333", "accessKeyId": "ASIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROAEXAMPLEID", "arn": "arn:aws:iam::111122223333:role/ExampleRole", "accountId": "111122223333", "userName": "ExampleRole" }, "attributes": { "creationDate": "2026-11-20T16:20:08Z", "mfaAuthenticated": "false" } } }, "eventTime": "2026-11-20T16:21:10Z", "eventSource": "monitoring.amazonaws.com", "eventName": "StartMonitoringAssessment", "awsRegion": "us-east-2", "sourceIPAddress": "192.0.2.1", "userAgent": "aws-sdk-java/2.x", "requestParameters": { "retentionInDays": 30, "scope": { "predefinedScope": { "type": "AcceleratedComputeInsights" } } }, "responseElements": null, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "readOnly": true, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }
Query generation information in CloudTrail
CloudTrail logging for Query generator console events is also supported. Query generator is currently supported for
CloudWatch Metric Insights and CloudWatch Logs Insights. In these CloudTrail events, the eventSource is monitoring.amazonaws.com.
The following example shows a
CloudTrail log entry that demonstrates the GenerateQuery action in CloudWatch Metrics Insights.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::123456789012:assumed-role/role_name", "accountId": "123456789012", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111222333444:role/Administrator", "accountId": "123456789012", "userName": "SAMPLE_NAME" }, "attributes": { "creationDate": "2020-04-08T21:43:24Z", "mfaAuthenticated": "false" } } }, "eventTime": "2020-04-08T23:06:30Z", "eventSource": "monitoring.amazonaws.com", "eventName": "GenerateQuery", "awsRegion": "us-east-1", "sourceIPAddress": "127.0.0.1", "userAgent": "exampleUserAgent", "requestParameters": { "query_ask": "***", "query_type": "MetricsInsights", "metrics_insights": { "aws_namespaces": [ "AWS/S3", "AWS/Lambda", "AWS/DynamoDB" ] }, "include_description": true }, "responseElements": null, "requestID": "2f56318c-cfbd-4b60-9d93-1234567890", "eventID": "52723fd9-4a54-478c-ac55-1234567890", "readOnly": true, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }
Amazon Q Developer operational investigations events in CloudTrail
Amazon Q Developer operational investigations supports logging the following actions as events in CloudTrail log files.
Example: Amazon Q Developer operational investigations log file entries
The following example shows a Amazon Q Developer operational investigations log entry that demonstrates the
CreateInvestigationGroup action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::123456789012:assumed-role/role_name", "accountId": "123456789012", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::123456789012:role/role_name", "accountId": "123456789012", "userName": "SAMPLE_NAME" }, "attributes": { "creationDate": "2024-10-30T18:42:05Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-10-30T18:48:26Z", "eventSource": "aiops.amazonaws.com", "eventName": "CreateInvestigationGroup", "awsRegion": "us-east-1", "sourceIPAddress": "127.0.0.1", "userAgent": "exampleUserAgent", "requestParameters": { "name": "exampleName", "roleArn": "arn:aws:iam::123456789012:role/role_name" }, "responseElements": { "arn": "arn:aws:aiops:us-east-1:123456789012:investigation-group/021345abcdef67890" }, "requestId": "e9caf887-8d88-11e5-a331-3332aa445952", "requestId": "49d14f36-6450-44a5-a501-b0fdcdfaeb98", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "123456789012", "eventCategory": "Management" }
The following example shows a Amazon Q Developer operational investigations log entry that demonstrates the
CreateInvestigationEvent action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:sts::123456789012:assumed-role/role_name", "accountId": "123456789012", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::123456789012:role/role_name", "accountId": "123456789012", "userName": "SAMPLE_NAME" }, "attributes": { "creationDate": "2024-10-30T16:17:49Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-10-30T16:35:34Z", "eventSource": "aiops.amazonaws.com", "eventName": "CreateInvestigationEvent", "awsRegion": "us-east-1", "sourceIPAddress": "127.0.0.1", "userAgent": "exampleUserAgent", "requestParameters": { "identifier": "arn:aws:aiops:us-east-1:123456789012:investigation-group/021345abcdef67890", "investigationId": "bcdef01234567890", "clientToken": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "type": "METRIC_OBSERVATION", "body": "***" }, "responseElements": { "investigationGroupArn": "arn:aws:aiops:us-east-1:123456789012:investigation-group/021345abcdef67890", "investigationId": "bcdef01234567890", "investigationEventId": "14567890abcdef0g" }, "requestId": "e9caf887-8d88-11e5-a331-3332aa445952", "eventId": "49d14f36-6450-44a5-a501-b0fdcdfaeb98", "readOnly": false, "resources": [{ "accountId": "123456789012", "type": "AWS::AIOps::InvestigationGroup", "ARN": "arn:aws:aiops:us-east-1:123456789012:investigation-group/021345abcdef67890" }], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "123456789012", "eventCategory": "Data" }
The following example shows a Amazon Q Developer operational investigations log entry that demonstrates the
UpdateInvestigationEvent action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:sts::123456789012:assumed-role/role_name", "accountId": "123456789012", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::123456789012:role/role_name", "accountId": "123456789012", "userName": "SAMPLE_NAME" }, "attributes": { "creationDate": "2024-10-30T16:17:49Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-10-30T16:24:48Z", "eventSource": "aiops.amazonaws.com", "eventName": "UpdateInvestigationEvent", "awsRegion": "us-east-1", "sourceIPAddress": "127.0.0.1", "userAgent": "exampleUserAgent", "requestParameters": { "identifier": "arn:aws:aiops:us-east-1:123456789012:investigation-group/021345abcdef67890", "investigationId": "bcdef01234567890", "investigationEventId": "14567890abcdef0g", "comment": "***" }, "responseElements": null, "requestId": "e9caf887-8d88-11e5-a331-3332aa445952", "eventId": "49d14f36-6450-44a5-a501-b0fdcdfaeb98", "readOnly": false, "resources": [{ "accountId": "123456789012", "type": "AWS::AIOps::InvestigationGroup", "ARN": "arn:aws:aiops:us-east-1:123456789012:investigation-group/021345abcdef67890" }], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "123456789012", "eventCategory": "Data" }
Network Flow Monitor in CloudTrail
Network Flow Monitor supports logging the following actions as events in CloudTrail log files.
Example: Network Flow Monitor log file entry
The following example shows a Network Flow Monitor CloudTrail log file entry that demonstrates the
CreateMonitor action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::000000000000:assumed-role/role_name", "accountId": "123456789012", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::000000000000:role/Admin", "accountId": "123456789012", "userName": "SAMPLE_NAME" }, "attributes": { "creationDate": "2024-11-03T15:43:27Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-11-03T15:58:11Z", "eventSource": "networkflowmonitor.amazonaws.com", "eventName": "CreateMonitor", "awsRegion": "us-east-1", "sourceIPAddress": "192.0.2.0", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "requestParameters": { "MonitorName": "TestMonitor", "ClientToken": "33551db7-1618-4aab-cdef-EXAMPLE33333", "LocalResources": [ { "Type": "AWS::EC2::Subnet", "Identifier": "subnet-cdef-EXAMPLEbbbbb" }, { "Type": "AWS::EC2::Subnet", "Identifier": "subnet-cdef-EXAMPLEccccc" }, { "Type": "AWS::EC2::Subnet", "Identifier": "subnet-cdef-EXAMPLEddddd" }, { "Type": "AWS::EC2::Subnet", "Identifier": "subnet-cdef-EXAMPLEeeeee" }, { "Type": "AWS::EC2::Subnet", "Identifier": "subnet-cdef-EXAMPLEfffff" }, { "Type": "AWS::EC2::Subnet", "Identifier": "subnet-cdef-EXAMPLEggggg" } ] }, "responseElements": { "Access-Control-Expose-Headers": "*", "MonitorArn": "arn:aws:networkflowmonitor:us-east-1:000000000000:monitor/TestMonitor", "MonitorName": "TestMonitor", "MonitorStatus": "ACTIVE" }, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }
{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::000000000000:assumed-role/role_name", "accountId":"123456789012", "accessKeyId":"AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::000000000000:role/Admin", "accountId":"123456789012", "userName": "SAMPLE_NAME" }, "webIdFederationData": {}, "attributes": { "creationDate": "2022-10-11T17:25:41Z", "mfaAuthenticated": "false" } } }, "eventTime": "2022-10-11T17:30:18Z", "eventSource": "networkflowmonitor.amazonaws.com", "eventName": "ListMonitors", "awsRegion": "us-east-2", "sourceIPAddress": "192.0.2.0", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "requestParameters": null, "responseElements": null, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb", "readOnly": true, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }
Network Flow Monitor data plane events in CloudTrail
CloudTrail can capture API activities related to the CloudWatch-NetworkFlowMonitor data plane operations.
Data events, also known as data plane operations, give you insight into the resource operations performed on or within a resource. Data events are often high-volume activities.
To enable logging of Network Flow Monitor data events in CloudTrail files, you'll need to enable the logging of data plane API activity in CloudTrail. See Logging data events for trails for more information.
Data plane events can be filtered by resource type. Because there are additional costs for using data events in CloudTrail, filtering by resource allows you to have more control over what you log and pay for.
Using the information that CloudTrail collects, you can identify a specific request to the CloudWatch-NetworkFlowMonitor data plane APIs, the IP address of the requester, the requester's identity, and the date and time of the request. Logging the data plane APIs using CloudTrail can help you with operational and risk auditing, governance, and compliance of your AWS account.
The following are data plane APIs in Network Flow Monitor.
The following example shows a CloudTrail log entry that demonstrates the GetQueryResultsMonitorsTopContributors action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::000000000000:assumed-role/role_name", "accountId": "123456789012", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::000000000000:role/Admin", "accountId": "123456789012", "userName": "SAMPLE_NAME" }, "attributes": { "creationDate": "2024-11-03T15:43:27Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-11-15T14:08:04Z", "eventSource": "networkflowmonitor.amazonaws.com", "eventName": "GetQueryResultsMonitorTopContributors", "awsRegion": "us-east-1", "sourceIPAddress": "192.0.2.0", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "errorCode": "AccessDenied", "requestParameters": { "QueryId": "a1b2c3d4-5678-90ab-cdef-EXAMPLEQuery, "MaxResults": "20", "MonitorName": "TestMonitor" }, "responseElements": null, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb", "readOnly": true, "resources": [ { "accountId": "123456789012", "type": "AWS::NetworkFlowMonitor::Monitor", "ARN": "arn:aws:networkflowmonitor:us-east-1:123456789012:monitor/TestMonitor" } ], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "000000000000", "eventCategory": "Data" }
The following example shows a CloudTrail log entry that demonstrates the GetQueryResultsWorkloadInsightsTopContributors action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::000000000000:assumed-role/role_name", "accountId": "123456789012", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::000000000000:role/Admin", "accountId": "123456789012", "userName": "SAMPLE_NAME" }, "attributes": { "creationDate": "2024-11-03T15:43:27Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-11-15T14:08:04Z", "eventSource": "networkflowmonitor.amazonaws.com", "eventName": "GetQueryResultsWorkloadInsightsTopContributorsData", "awsRegion": "us-east-1", "sourceIPAddress": "192.0.2.0", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "errorCode": "AccessDenied", "requestParameters": { "QueryId": "a1b2c3d4-5678-90ab-cdef-EXAMPLEQuery", "ScopeId": "a1b2c3d4-5678-90ab-cdef-EXAMPLEScope" }, "responseElements": null, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb", "readOnly": true, "resources": [ { "accountId": "496383180932", "type": "AWS::NetworkFlowMonitor::Scope", "ARN": "arn:aws:networkflowmonitor:us-east-1:123456789012:scope/a1b2c3d4-5678-90ab-cdef-EXAMPLEScope" } ], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "000000000000", "eventCategory": "Data" }
Internet Monitor in CloudTrail
Internet Monitor supports logging the following actions as events in CloudTrail log files.
Example: Internet Monitor log file entries
The following example shows a CloudTrail Internet Monitor log entry that demonstrates the
ListMonitors action.
{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::000000000000:assumed-role/role_name", "accountId":"123456789012", "accessKeyId":"AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::000000000000:role/Admin", "accountId":"123456789012", "userName": "SAMPLE_NAME" }, "webIdFederationData": {}, "attributes": { "creationDate": "2022-10-11T17:25:41Z", "mfaAuthenticated": "false" } } }, "eventTime": "2022-10-11T17:30:18Z", "eventSource": "internetmonitor.amazonaws.com", "eventName": "ListMonitors", "awsRegion": "us-east-2", "sourceIPAddress": "192.0.2.0", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "requestParameters": null, "responseElements": null, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb", "readOnly": true, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }
The following example shows a CloudTrail Internet Monitor log entry that demonstrates the
CreateMonitor action.
{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::000000000000:assumed-role/role_name", "accountId":"123456789012", "accessKeyId":"AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::000000000000:role/Admin", "accountId":"123456789012", "userName": "SAMPLE_NAME" }, "webIdFederationData": {}, "attributes": { "creationDate": "2022-10-11T17:25:41Z", "mfaAuthenticated": "false" } } }, "eventTime": "2022-10-11T17:30:08Z", "eventSource": "internetmonitor.amazonaws.com", "eventName": "CreateMonitor", "awsRegion": "us-east-2", "sourceIPAddress": "192.0.2.0", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "requestParameters": { "MonitorName": "TestMonitor", "Resources": ["arn:aws:ec2:us-east-2:444455556666:vpc/vpc-febc0b95"], "ClientToken": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333" }, "responseElements": { "Arn": "arn:aws:internetmonitor:us-east-2:444455556666:monitor/ct-onboarding-test", "Status": "PENDING" }, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }
CloudWatch Synthetics information in CloudTrail
CloudWatch Synthetics supports logging the following actions as events in CloudTrail log files:
When you add, update, or remove replica locations for a multilocation
canary, related activity appears in CloudTrail in each affected replica Region
under the event name ReplicateCanary.
Example: CloudWatch Synthetics log file entries
The following example shows a CloudTrail Synthetics log entry that demonstrates the
DescribeCanaries action.
{ "eventVersion": "1.05", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::123456789012:assumed-role/role_name", "accountId":"123456789012", "accessKeyId":"AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111222333444:role/Administrator", "accountId":"123456789012", "userName": "SAMPLE_NAME" }, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2020-04-08T21:43:24Z" } } }, "eventTime": "2020-04-08T23:06:47Z", "eventSource": "synthetics.amazonaws.com", "eventName": "DescribeCanaries", "awsRegion": "us-east-1", "sourceIPAddress": "127.0.0.1", "userAgent": "aws-internal/3 aws-sdk-java/1.11.590 Linux/4.9.184-0.1.ac.235.83.329.metal1.x86_64 OpenJDK_64-Bit_Server_VM/25.212-b03 java/1.8.0_212 vendor/Oracle_Corporation", "requestParameters": null, "responseElements": null, "requestID": "201ed5f3-15db-4f87-94a4-123456789", "eventID": "73ddbd81-3dd0-4ada-b246-123456789", "readOnly": true, "eventType": "AwsApiCall", "recipientAccountId": "111122223333" }
The following example shows a CloudTrail Synthetics log entry that demonstrates the
UpdateCanary action.
{ "eventVersion": "1.05", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::123456789012:assumed-role/role_name", "accountId":"123456789012", "accessKeyId":"AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111222333444:role/Administrator", "accountId":"123456789012", "userName": "SAMPLE_NAME" }, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2020-04-08T21:43:24Z" } } }, "eventTime": "2020-04-08T23:06:47Z", "eventSource": "synthetics.amazonaws.com", "eventName": "UpdateCanary", "awsRegion": "us-east-1", "sourceIPAddress": "192.0.2.0", "userAgent": "aws-internal/3 aws-sdk-java/1.11.590 Linux/4.9.184-0.1.ac.235.83.329.metal1.x86_64 OpenJDK_64-Bit_Server_VM/25.212-b03 java/1.8.0_212 vendor/Oracle_Corporation", "requestParameters": { "Schedule": { "Expression": "rate(1 minute)" }, "name": "sample_canary_name", "Code": { "Handler": "myOwnScript.handler", "ZipFile": "SAMPLE_ZIP_FILE" } }, "responseElements": null, "requestID": "fe4759b0-0849-4e0e-be71-1234567890", "eventID": "9dc60c83-c3c8-4fa5-bd02-1234567890", "readOnly": false, "eventType": "AwsApiCall", "recipientAccountId": "111122223333" }
The following example shows a CloudTrail Synthetics log entry that demonstrates the
GetCanaryRuns action.
{ "eventVersion": "1.05", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::123456789012:assumed-role/role_name", "accountId":"123456789012", "accessKeyId":"AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111222333444:role/Administrator", "accountId":"123456789012", "userName": "SAMPLE_NAME" }, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2020-04-08T21:43:24Z" } } }, "eventTime": "2020-04-08T23:06:30Z", "eventSource": "synthetics.amazonaws.com", "eventName": "GetCanaryRuns", "awsRegion": "us-east-1", "sourceIPAddress": "127.0.0.1", "userAgent": "aws-internal/3 aws-sdk-java/1.11.590 Linux/4.9.184-0.1.ac.235.83.329.metal1.x86_64 OpenJDK_64-Bit_Server_VM/25.212-b03 java/1.8.0_212 vendor/Oracle_Corporation", "requestParameters": { "Filter": "TIME_RANGE", "name": "sample_canary_name", "FilterValues": [ "2020-04-08T23:00:00.000Z", "2020-04-08T23:10:00.000Z" ] }, "responseElements": null, "requestID": "2f56318c-cfbd-4b60-9d93-1234567890", "eventID": "52723fd9-4a54-478c-ac55-1234567890", "readOnly": true, "eventType": "AwsApiCall", "recipientAccountId": "111122223333" }
CloudWatch RUM information in CloudTrail
CloudWatch RUM supports logging the following actions as events in CloudTrail log files:
Example: CloudWatch RUM log file entries
This section contains example CloudTrail entries for some CloudWatch RUM APIs.
The following example shows a CloudTrail log entry that demonstrates the CreateAppMonitor action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EXAMPLE_PRINCIPAL_ID", "arn": "arn:aws:sts::777777777777:assumed-role/EXAMPLE", "accountId": "777777777777", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EXAMPLE_PRINCIPAL_ID", "arn": "arn:aws:iam::777777777777:role/EXAMPLE", "accountId": "777777777777", "userName": "USERNAME_EXAMPLE" }, "attributes": { "creationDate": "2024-07-23T16:48:47Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-07-23T18:02:57Z", "eventSource": "rum.amazonaws.com", "eventName": "CreateAppMonitor", "awsRegion": "us-east-1", "sourceIPAddress": "54.240.198.39", "userAgent": "aws-internal/3 aws-sdk-java/1.12.641 Linux/5.10.219-186.866.amzn2int.x86_64 OpenJDK_64-Bit_Server_VM/25.402-b08 java/1.8.0_402 vendor/Oracle_Corporation cfg/retry-mode/standard", "requestParameters": { "CustomEvents": { "Status": "ENABLED" }, "CwLogEnabled": true, "Domain": "*.github.io", "AppMonitorConfiguration": { "SessionSampleRate": 1, "IncludedPages": [], "ExcludedPages": [], "Telemetries": [ "performance", "errors", "http" ], "EnableXRay": false, "AllowCookies": true, "IdentityPoolId": "us-east-1:c81b9a1c-a5c9-4de5-8585-eb8df04e66f0" }, "Tags": { "TestAppMonitor": "" }, "Name": "TestAppMonitor" }, "responseElements": { "Id": "65a8cc63-4ae8-4f2c-b5fc-4a54ef43af51" }, "requestID": "cf7c30ad-25d3-4274-bab1-39c95a558007", "eventID": "2d43cc69-7f89-4f1a-95ae-0fc7e9b9fb3b", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "777777777777", "eventCategory": "Management" }
The following example shows a CloudTrail log entry that demonstrates the PutRumMetricsDestination action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EXAMPLE_PRINCIPAL_ID", "arn": "arn:aws:sts::777777777777:assumed-role/EXAMPLE", "accountId": "777777777777", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EXAMPLE_PRINCIPAL_ID", "arn": "arn:aws:iam::777777777777:role/EXAMPLE", "accountId": "777777777777", "userName": "USERNAME_EXAMPLE" }, "attributes": { "creationDate": "2024-07-23T16:48:47Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-07-23T18:22:22Z", "eventSource": "rum.amazonaws.com", "eventName": "PutRumMetricsDestination", "awsRegion": "us-east-1", "sourceIPAddress": "52.94.133.142", "userAgent": "aws-cli/2.13.25 Python/3.11.5 Linux/5.10.219-186.866.amzn2int.x86_64 exe/x86_64.amzn.2 prompt/off command/rum.put-rum-metrics-destination", "requestParameters": { "Destination": "CloudWatch", "AppMonitorName": "TestAppMonitor" }, "responseElements": null, "requestID": "9b03fcce-b3a2-44fc-b771-900e1702998a", "eventID": "6250f9b7-0505-4f96-9668-feb64f82de5b", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "777777777777", "eventCategory": "Management" }
The following example shows a CloudTrail log entry that demonstrates the BatchCreateRumMetricsDefinitions action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EXAMPLE_PRINCIPAL_ID", "arn": "arn:aws:sts::777777777777:assumed-role/EXAMPLE", "accountId": "777777777777", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EXAMPLE_PRINCIPAL_ID", "arn": "arn:aws:iam::777777777777:role/EXAMPLE", "accountId": "777777777777", "userName": "USERNAME_EXAMPLE" }, "attributes": { "creationDate": "2024-07-23T16:48:47Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-07-23T18:23:11Z", "eventSource": "rum.amazonaws.com", "eventName": "BatchCreateRumMetricDefinitions", "awsRegion": "us-east-1", "sourceIPAddress": "52.94.133.142", "userAgent": "aws-cli/2.13.25 Python/3.11.5 Linux/5.10.219-186.866.amzn2int.x86_64 exe/x86_64.amzn.2 prompt/off command/rum.batch-create-rum-metric-definitions", "requestParameters": { "Destination": "CloudWatch", "MetricDefinitions": [ { "Name": "NavigationToleratedTransaction", "Namespace": "AWS/RUM", "DimensionKeys": { "metadata.browserName": "BrowserName" }, "EventPattern": "{\"metadata\":{\"browserName\":[\"Chrome\"]},\"event_type\":[\"com.amazon.rum.performance_navigation_event\"],\"event_details\": {\"duration\": [{\"numeric\": [\"<=\",2000,\"<\",8000]}]}}" }, { "Name": "HttpErrorCount", "DimensionKeys": { "metadata.browserName": "BrowserName", "metadata.countryCode": "CountryCode" }, "EventPattern": "{\"metadata\":{\"browserName\":[\"Chrome\"], \"countryCode\":[\"US\"]},\"event_type\":[\"com.amazon.rum.http_event\"]}" } ], "AppMonitorName": "TestAppMonitor" }, "responseElements": { "Errors": [], "MetricDefinitions": [] }, "requestID": "b14c5eda-f107-48e5-afae-1ac20d0962a8", "eventID": "001b55c6-1de1-48c0-a236-31096dffe249", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "777777777777", "eventCategory": "Management" }
CloudWatch RUM data plane events in CloudTrail
CloudTrail can capture API activities related to the CloudWatch RUM data plane operation PutRumEvents.
Data events, also known as data plane operations, give you insight into the resource operations performed on or within a resource. Data events are often high-volume activities.
To enable logging of the PutRumEvents data events in CloudTrail files, you'll need to enable the logging of data plane API activity in CloudTrail. See Logging data events for trails for more information.
Data plane events can be filtered by resource type. Because there are additional costs for using data events in CloudTrail, filtering by resource allows you to have more control over what you log and pay for.
Using the information that CloudTrail collects, you can identify a specific request to the CloudWatch RUM PutRumEvents API, the IP address of the requester, the requester's identity, and the date and time of the request. Logging the PutRumEvents API using CloudTrail helps you enable operational and risk auditing, governance, and compliance of your AWS account.
The following example shows a CloudTrail log entry that demonstrates the PutRumEvents action.
{ "Records": [ { "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EXAMPLE_PRINCIPAL_ID", "arn": "arn:aws:sts::777777777777:assumed-role/EXAMPLE", "accountId": "777777777777", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EXAMPLE_PRINCIPAL_ID", "arn": "arn:aws:iam::777777777777:role/EXAMPLE", "accountId": "777777777777", "userName": "USERNAME_EXAMPLE" }, "attributes": { "creationDate": "2024-05-16T20:32:39Z", "mfaAuthenticated": "false" } }, "invokedBy": "AWS Internal" }, "eventTime": "2024-05-16T20:32:42Z", "eventSource": "rum.amazonaws.com", "eventName": "PutRumEvents", "awsRegion": "us-east-1", "sourceIPAddress": "AWS Internal", "userAgent": "AWS Internal", "requestParameters": { "id": "73ddbd81-1234-5678-b246-123456789", "batchId": "123456-3dd0-4ada-b246-123456789", "appMonitorDetails": { "name": "APP-MONITOR-NAME", "id": "123456-3dd0-4ada-b246-123456789", "version": "1.0.0" }, "userDetails": { "userId": "73ddbd81-1111-9999-b246-123456789", "sessionId": "a1b2c3456-15db-4f87-6789-123456789" }, "rumEvents": [ { "id": "201f367a-15db-1234-94a4-123456789", "timestamp": "May 16, 2024, 8:32:20 PM", "type": "com.amazon.rum.dom_event", "metadata": "{}", "details": "{}" } ] }, "responseElements": null, "requestID": "201ed5f3-15db-4f87-94a4-123456789", "eventID": "73ddbd81-3dd0-4ada-b246-123456789", "readOnly": false, "resources": [ { "accountId": "777777777777", "type": "AWS::RUM::AppMonitor", "ARN": "arn:aws:rum:us-east-1:777777777777:appmonitor/APPMONITOR_NAME_EXAMPLE" } ], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "777777777777", "eventCategory": "Data" } ] }
Network Synthetic Monitor information in CloudTrail
Network Synthetic Monitor supports logging the following actions as events in CloudTrail log files:
Example: Network Synthetic Monitor log file entries
The following example shows a Network Synthetic Monitor CloudTrail log entry that demonstrates the
CreateMonitor action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111122223333:assumed-role/role_name", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111122223333:role/Admin", "accountId": "111122223333", "userName": "SAMPLE_NAME" }, "attributes": { "creationDate": "2024-11-03T15:43:27Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-11-03T15:58:11Z", "eventSource": "networksynthetics.amazonaws.com", "eventName": "CreateMonitor", "awsRegion": "us-east-1", "sourceIPAddress": "192.0.2.0", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "requestParameters": { "MonitorName": "TestNetworkSyntheticMonitor", "ClientToken": "33551db7-1618-4aab-cdef-EXAMPLE33333" }, "responseElements": { "MonitorArn": "arn:aws:networksynthetics:us-east-1:111122223333:monitor/TestNetworkSyntheticMonitor", "MonitorName": "TestNetworkSyntheticMonitor", "MonitorStatus": "ACTIVE" }, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }
CloudWatch Observability Access Manager information in CloudTrail
CloudWatch Observability Access Manager supports logging the following actions as events in CloudTrail log files:
Example: CloudWatch Observability Access Manager log file entries
The following example shows a CloudWatch Observability Access Manager CloudTrail log entry that demonstrates the
CreateSink action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111122223333:assumed-role/role_name", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111122223333:role/Admin", "accountId": "111122223333", "userName": "SAMPLE_NAME" }, "attributes": { "creationDate": "2024-11-03T15:43:27Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-11-03T15:58:11Z", "eventSource": "oam.amazonaws.com", "eventName": "CreateSink", "awsRegion": "us-east-1", "sourceIPAddress": "192.0.2.0", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "requestParameters": { "Name": "TestObservabilitySink" }, "responseElements": { "Arn": "arn:aws:oam:us-east-1:111122223333:sink/TestObservabilitySink", "Id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "Name": "TestObservabilitySink" }, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }
CloudWatch Observability Admin information in CloudTrail
CloudWatch Observability Admin supports logging the following actions as events in CloudTrail log files:
Example: CloudWatch Observability Admin log file entries
The following example shows a CloudWatch Observability Admin CloudTrail log entry that demonstrates the
StartTelemetryEvaluation action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111122223333:assumed-role/role_name", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111122223333:role/Admin", "accountId": "111122223333", "userName": "SAMPLE_NAME" }, "attributes": { "creationDate": "2024-11-03T15:43:27Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-11-03T15:58:11Z", "eventSource": "observabilityadmin.amazonaws.com", "eventName": "StartTelemetryEvaluation", "awsRegion": "us-east-1", "sourceIPAddress": "192.0.2.0", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "requestParameters": {}, "responseElements": null, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }
CloudWatch Application Signals information in CloudTrail
CloudWatch Application Signals supports logging the following actions as events in CloudTrail log files:
Example: CloudWatch Application Signals log file entries
The following example shows a CloudWatch Application Signals CloudTrail log entry that demonstrates the
CreateServiceLevelObjective action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111122223333:assumed-role/role_name", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111122223333:role/Admin", "accountId": "111122223333", "userName": "SAMPLE_NAME" }, "attributes": { "creationDate": "2024-11-03T15:43:27Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-11-03T15:58:11Z", "eventSource": "applicationsignals.amazonaws.com", "eventName": "CreateServiceLevelObjective", "awsRegion": "us-east-1", "sourceIPAddress": "192.0.2.0", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "requestParameters": { "Name": "TestSLO", "Description": "Test Service Level Objective" }, "responseElements": { "Arn": "arn:aws:applicationsignals:us-east-1:111122223333:slo/TestSLO" }, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }
CloudWatch Application Insights information in CloudTrail
CloudWatch Application Insights supports logging the following actions as events in CloudTrail log files:
Example: CloudWatch Application Insights log file entries
The following example shows a CloudWatch Application Insights CloudTrail log entry that demonstrates the
CreateApplication action.
{ "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111122223333:assumed-role/role_name", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::111122223333:role/Admin", "accountId": "111122223333", "userName": "SAMPLE_NAME" }, "attributes": { "creationDate": "2024-11-03T15:43:27Z", "mfaAuthenticated": "false" } } }, "eventTime": "2024-11-03T15:58:11Z", "eventSource": "applicationinsights.amazonaws.com", "eventName": "CreateApplication", "awsRegion": "us-east-1", "sourceIPAddress": "192.0.2.0", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)", "requestParameters": { "ResourceGroupName": "TestApplicationResourceGroup" }, "responseElements": { "ApplicationInfo": { "ResourceGroupName": "TestApplicationResourceGroup", "LifeCycle": "ACTIVE" } }, "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }