NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

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

Namespace: Aws\CloudTrail
Located at Aws/CloudTrail/LogFileReader.php

## Methods summary

- `public` `__construct ( Aws\S3\S3Client $s3Client )`
- `public` `read ( string $s3BucketName, string $logFileKey )`

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

## Methods detail

# `public`
`__construct( `Aws\S3\S3Client` $s3Client )`

#### Parameters

$s3Client
  ``Aws\S3\S3Client``
  $s3Client

# `public array`
`read( string $s3BucketName, string $logFileKey )`

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

#### Parameters

$s3BucketName
  `string`
  $s3BucketName The bucket name of the log file in Amazon S3
$logFileKey
  `string`
  $logFileKey The key of the log file in Amazon S3

#### Returns

`array`

### Magic methods summary