Class LogFileReader
This class provides an easy way to read log files generated by AWS CloudTrail.
CloudTrail log files contain data about your AWS API calls and are stored in Amazon S3. The log files are gzipped and contain structured data in JSON format. This class will automatically ungzip and decode the data, and return the data as an array of log records
Methods Summary
- __construct ( Aws\S3\S3Client $s3Client )
-
read ( string $s3BucketName, string $logFileKey )
Downloads, unzips, and reads a CloudTrail log file from Amazon S3
Methods Details
__construct (
Aws\S3\S3Client
$s3Client
)
Parameters
Aws\S3\S3Client |
$s3Client | S3 client used to retrieve objects |
array read ( string $s3BucketName, string $logFileKey )
Downloads, unzips, and reads a CloudTrail log file from Amazon S3
Parameters
string | $s3BucketName | The bucket name of the log file in Amazon S3 |
string | $logFileKey | The key of the log file in Amazon S3 |
Returns
array |