AWS S3 :: PHP script that parses log files

I need a PHP script that fetches log files from a given S3 bucket, and then parses values into an array I can use for different purposes.

The script should be based on the [Amazon S3 PHP class] to download/delete/move log files on the remote S3 Bucket, so what I need is just a PHP script that executes the [S3 PHP Class] and parses and handles the log files using regex and other fancy php features. If you suggest another way to accomplish this, please collaborate.

[Script work flow:]

1. Initialize Amazon S3 PHP class

2. Set bucket name from: $_POST['bucket']; ($bucket = $_POST['bucket'];)

3. Set log file prefix from: $_POST['logfileprefix']; ($prefix = $_POST['logfileprefix'];)

4. Download all log files that are present in [$bucket], based on the file prefix [$prefix] ($prefix can for example be: "logfile_") into a sub folder of the script it self.

5. Move all log files that were downloaded from the $bucket folder and into a sub folder of the given bucket, so they are not processed next time the script runs. ($bucket."/processed_single_log_files")

6. To make the parsing job easy, I suggest compacting all log files into one big log file, before parsing it.

7. Start parsing the log files. They are "space" separated as far as I know. Check this link from Amazon AWS to learn more about the log format: [url removed, login to view]

8. a

For each line/loop - I need all the values/fields available in an array, so I can properly insert each line into a MySQL database.

8. b

For each line/loop - I need a incremental $string/$integer that sums the total "Bytes Sent" (from the "Bytes Sent" column) for all the lines.

9. Upload the "compacted" file to a sub folder of $bucket, ($bucket."/processed_compacted_log_files")

10. You shall not covet anything that belongs to your neighbor

If you have no idea what S3 or AWS, don't bid. I need this done fast.

Habilidades: Computação em nuvem, Perl, PHP

Veja mais: parsing log files php, amazon log files php, aws php script download log files, amazon log files, what are work values, using regex in c, string prefix, string b, remote work php, regex is, regex in c, regex example, regex c, prefix string, prefix of a string, name flow, learn php fast, job values, is in a prefix, download php 5.3, bucket log php, parsing log aws, aws log regex, log parsing php, remote download aws

Acerca do Empregador:
( 12 comentários ) 1169, Norway

ID do Projeto: #560195

Concedido a:


Sounds fairly easy. I love Amazon EC2.

$50 USD em 1 dia
(1 Comentário)

3 freelancers estão ofertando em média $200 para esse trabalho


pls chk pmb

$300 USD in 5 dias
(525 Comentários)

please see my message in PMB for details, thanks

$250 USD in 7 dias
(0 Comentários)