Log Amazon Pinpoint API calls with AWS CloudTrail - Amazon Pinpoint

Log Amazon Pinpoint API calls with AWS CloudTrail

Amazon Pinpoint is integrated with AWS CloudTrail, which is a service that provides a record of actions taken by a user, role, or AWS service in Amazon Pinpoint. CloudTrail captures API calls for Amazon Pinpoint as events. The calls that are captured include calls from the Amazon Pinpoint console and code calls to Amazon Pinpoint API operations.

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 Amazon Pinpoint. If you don't configure a trail, you can still view the most recent events by using Event history on the CloudTrail console. Using the information collected by CloudTrail, you can determine the request that was made to Amazon Pinpoint, the IP address that the request was made from, who made the request, when it was made, and additional details.

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

Amazon Pinpoint information in CloudTrail

CloudTrail is enabled on your AWS account when you create the account. When supported event activity occurs in Amazon Pinpoint, that activity is recorded in a CloudTrail event along with other AWS service events in Event history. You can view, search, and download recent events in your AWS account. For more information, see Viewing events with CloudTrail event history.

For an ongoing record of events in your AWS account, including events for Amazon Pinpoint, 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 AWS Regions. The trail logs events from all Regions in the AWS partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs. For more information, see the following:

Every event or log entry contains information about who generated the request. The identity information helps you determine:

  • Whether the request was made with root or AWS Identity and Access Management user credentials.

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

  • Whether the request was made by another AWS service.

For more information, see CloudTrail userIdentity element.

You can create a trail and store your log files in your Amazon S3 bucket for as long as you want. Also, you can define Amazon S3 lifecycle rules to archive or delete log files automatically. By default, your log files are encrypted with Amazon S3 server-side encryption (SSE).

To be notified of log file delivery, configure CloudTrail to publish Amazon SNS notifications when new log files are delivered. For more information, see Configuring Amazon SNS notifications for CloudTrail.

You can also aggregate Amazon Pinpoint log files from multiple AWS Regions and multiple AWS accounts into a single Amazon S3 bucket. For more information, see Receiving CloudTrail log files from multiple regions and Receiving CloudTrail log files from multiple accounts.

You can use CloudTrail to log actions for the following Amazon Pinpoint APIs: