Logging Amazon Trusted Advisor console actions with Amazon CloudTrail - Amazon Web Services Support
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Logging Amazon Trusted Advisor console actions with Amazon CloudTrail

Trusted Advisor is integrated with Amazon CloudTrail, a service that provides a record of actions taken by a user, role, or an Amazon service in Trusted Advisor. CloudTrail captures actions for Trusted Advisor as events. The calls captured include calls from the Trusted Advisor console. If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon Simple Storage Service (Amazon S3) bucket, including events for Trusted Advisor. If you don't configure a trail, you can still view the most recent events in the CloudTrail console in Event history. Using the information collected by CloudTrail, you can determine the request that was made to Trusted Advisor, the IP address from which the request was made, who made the request, when it was made, and additional details.

To learn more about CloudTrail, including how to configure and enable it, see theAmazon CloudTrail User Guide.

Trusted Advisor information in CloudTrail

CloudTrail is enabled on your Amazon account when you create the account. When supported event activity occurs in the Trusted Advisor console, that activity is recorded in a CloudTrail event along with other Amazon service events in Event history. You can view, search, and download recent events in your Amazon account. For more information, seeViewing Events with CloudTrail Event History.

For an ongoing record of events in your Amazon account, including events for Trusted Advisor, create a trail. A trail enables CloudTrail to deliver log files to an Amazon S3 bucket. By default, when you create a trail in the console, the trail applies to all Amazon Regions. The trail logs events from all Regions in the Amazon partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can configure other Amazon services to further analyze and act upon the event data collected in CloudTrail logs. For more information, see the following:

Trusted Advisor supports logging a subset of the Trusted Advisor console actions as events in CloudTrail log files. CloudTrail logs the following actions:

For a complete list of Trusted Advisor console actions, seeTrusted Advisor actions.

Note

CloudTrail also logs the Trusted Advisor API operations in the Amazon Web Services Support API Reference. For more information, seeLogging Amazon Web Services Support API calls with Amazon CloudTrail.

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 or Amazon Identity and Access Management (IAM) user credentials.

  • Whether the request was made with temporary security credentials for a role or federated user.

  • Whether the request was made by another Amazon service.

For more information, see theCloudTrail userIdentity Element.

Example: Trusted Advisor Log File Entries

A trail is a configuration that enables delivery of events as log files to an Amazon S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files aren't an ordered stack trace of the public API calls, so they don't appear in any specific order.

Example : Log entry for RefreshCheck

The following example shows a CloudTrail log entry that demonstrates the RefreshCheck action for the Amazon S3 Bucket Versioning check (ID R365s2Qddf).

{ "eventVersion":"1.04", "userIdentity":{ "type":"IAMUser", "principalId":"AIDACKCEVSQ6C2EXAMPLE", "arn":"arn:aws:iam::123456789012:user/janedoe", "accountId":"123456789012", "accessKeyId":"AKIAIOSFODNN7EXAMPLE", "userName":"janedoe", "sessionContext":{ "attributes":{ "mfaAuthenticated":"false", "creationDate":"2020-10-21T22:06:18Z" } } }, "eventTime":"2020-10-21T22:06:33Z", "eventSource":"trustedadvisor.amazonaws.com", "eventName":"RefreshCheck", "awsRegion":"us-east-1", "sourceIPAddress":"100.127.34.136", "userAgent":"signin.amazonaws.com", "requestParameters":{ "checkId":"R365s2Qddf" }, "responseElements":{ "status":{ "checkId":"R365s2Qddf", "status":"enqueued", "millisUntilNextRefreshable":3599993 } }, "requestID":"d23ec729-8995-494c-8054-dedeaEXAMPLE", "eventID":"a49d5202-560f-4a4e-b38a-02f1cEXAMPLE", "eventType":"AwsApiCall", "recipientAccountId":"123456789012" }
Example : Log entry for UpdateNotificationPreferences

The following example shows a CloudTrail log entry that demonstrates the UpdateNotificationPreferences action.

{ "eventVersion":"1.04", "userIdentity":{ "type":"IAMUser", "principalId":"AIDACKCEVSQ6C2EXAMPLE", "arn":"arn:aws:iam::123456789012:user/janedoe", "accountId":"123456789012", "accessKeyId":"AKIAIOSFODNN7EXAMPLE", "userName":"janedoe", "sessionContext":{ "attributes":{ "mfaAuthenticated":"false", "creationDate":"2020-10-21T22:06:18Z" } } }, "eventTime":"2020-10-21T22:09:49Z", "eventSource":"trustedadvisor.amazonaws.com", "eventName":"UpdateNotificationPreferences", "awsRegion":"us-east-1", "sourceIPAddress":"100.127.34.167", "userAgent":"signin.amazonaws.com", "requestParameters":{ "contacts":[ { "id":"billing", "type":"email", "active":false }, { "id":"operational", "type":"email", "active":false }, { "id":"security", "type":"email", "active":false } ], "language":"en" }, "responseElements":null, "requestID":"695295f3-c81c-486e-9404-fa148EXAMPLE", "eventID":"5f923d8c-d210-4037-bd32-997c6EXAMPLE", "eventType":"AwsApiCall", "recipientAccountId":"123456789012" }
Example : Log entry for GenerateReport

The following example shows a CloudTrail log entry that demonstrates the GenerateReport action. This action creates a report for your Amazon organization.

{ "eventVersion":"1.04", "userIdentity":{ "type":"IAMUser", "principalId":"AIDACKCEVSQ6C2EXAMPLE", "arn":"arn:aws:iam::123456789012:user/janedoe", "accountId":"123456789012", "accessKeyId":"AKIAIOSFODNN7EXAMPLE", "userName":"janedoe", "sessionContext":{ "attributes":{ "mfaAuthenticated":"false", "creationDate":"2020-11-03T13:03:10Z" } } }, "eventTime":"2020-11-03T13:04:29Z", "eventSource":"trustedadvisor.amazonaws.com", "eventName":"GenerateReport", "awsRegion":"us-east-1", "sourceIPAddress":"100.127.36.171", "userAgent":"signin.amazonaws.com", "requestParameters":{ "refresh":false, "includeSuppressedResources":false, "language":"en", "format":"JSON", "name":"organizational-view-report", "preference":{ "accounts":[ ], "organizationalUnitIds":[ "r-j134" ], "preferenceName":"organizational-view-report", "format":"json", "language":"en" } }, "responseElements":{ "status":"ENQUEUED" }, "requestID":"bb866dc1-60af-47fd-a660-21498EXAMPLE", "eventID":"2606c89d-c107-47bd-a7c6-ec92fEXAMPLE", "eventType":"AwsApiCall", "recipientAccountId":"123456789012" }