Documentation

LogFileReader
in package

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 a array of log records

Table of Contents

$s3Client  : S3Client
__construct()  : mixed
read()  : array<string|int, mixed>
Downloads, unzips, and reads a CloudTrail log file from Amazon S3

Properties

Methods

__construct()

public __construct(S3Client $s3Client) : mixed
Parameters
$s3Client : S3Client

S3 client used to retrieve objects

Return values
mixed

read()

Downloads, unzips, and reads a CloudTrail log file from Amazon S3

public read(string $s3BucketName, string $logFileKey) : array<string|int, mixed>
Parameters
$s3BucketName : string

The bucket name of the log file in Amazon S3

$logFileKey : string

The key of the log file in Amazon S3

Return values
array<string|int, mixed>

Search results