Logging API calls with Amazon CloudTrail
Amazon WAF, Amazon Shield Advanced, and Amazon Firewall Manager are integrated with Amazon CloudTrail, a service that provides a record of actions taken by a user, role, or an Amazon service. CloudTrail captures a subset of API calls for these services as events, including calls from the Amazon WAF, Shield Advanced or Firewall Manager consoles and from code calls to the Amazon WAF, Shield Advanced, or Firewall Manager APIs. If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for Amazon WAF, Shield Advanced, or Firewall Manager. 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 these services, 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 Amazon CloudTrail User Guide.
CloudTrail is enabled on your Amazon Web Services account when you create the account. When supported event activity occurs in Amazon WAF, Shield Advanced, or Firewall Manager, 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 Web Services account. For more information, see Viewing Events with CloudTrail Event History.
For an ongoing record of events in your Amazon Web Services account, including events for Amazon WAF, Shield Advanced, or Firewall Manager, create a trail. A trail enables CloudTrail to deliver log files to an Amazon S3 bucket. By default, when you create a trail on the console, the trail applies to all 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: