You can do this through the console by using Cloudtrail.
From an AWS article on this topic
AWS WAF is integrated with CloudTrail, a service that captures all the AWS WAF API calls and delivers the log files to an Amazon S3 bucket that you specify.
Try the Cloudtrail getting started