From e8a9353b3d14089892d7a769c95663cb7b77b979 Mon Sep 17 00:00:00 2001 From: Joe Turgeon Date: Tue, 6 Aug 2019 13:05:12 -0500 Subject: [PATCH] Updating changelog and package.json for 3.0.0 release. Adding documentation for the formatS3Access handler. --- CHANGELOG.md | 5 +++++ README.md | 24 ++++++++++++++++++++++-- package.json | 4 ++-- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2376dc..656f04c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log for lambda-stash +## 3.0.0 [2019/08/06] + +- Adding support for the S3 access log format. +- Dropping support for Node.js v4. + ## 2.0.0 [2018/05/23] - Adding support for ELB Classic Load Balancer (elbv1) and Application Load diff --git a/README.md b/README.md index 80ffe5f..e15c3f5 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ data sources to data stores, like Elasticsearch. - Supported input formats: AWS Cloudfront access logs, AWS Cloudtrail API logs, AWS CloudWatch logs, AWS Config change logs, AWS Elastic Load Balancer access -logs, and other formats by implementing a custom handler. +logs, AWS S3 access logs, and other formats by implementing a custom handler. - Supported output formats: JSON, plain text key-value pairs. @@ -25,7 +25,7 @@ with your configuration. See the example included (under `example/`) and the configuration documentation below to get started. 2. Use the AWS Management Console to create a Lambda function using the Node.js -6.10 runtime. Upload your package, configure it with event sources as desired +10.x runtime. Upload your package, configure it with event sources as desired (S3 buckets or CloudWatch logs). Be sure the Lambda function has an IAM role with any necessary permissions, like getting data from an S3 bucket or accessing an AWS Elasticsearch domain. @@ -209,6 +209,26 @@ contain the log's date time value. - `config.data` is transformed to an array of objects with log data. +### formatS3Access + +Processes parsed data from AWS Simple Storage Service (S3) access logs and +normalizes it in key-value objects. + +Raw S3 log files should be processed with `parseSpaces` before using this +format handler. + +**Inputs**: + +- `config.data` should be an array (one item per log record) of arrays (one item +per record field). + +- `config.dateField` (optional) is the key name in the output that should +contain the log's date time value. + +**Outputs**: + +- `config.data` is transformed to an array of objects with log data. + ### getS3Object Fetches an object from S3. diff --git a/package.json b/package.json index 002f38f..6d74ada 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lambda-stash", - "version": "2.0.0", + "version": "3.0.0", "description": "AWS Lambda script for shipping data from S3 or other cloud data sources to data stores, like Elasticsearch", "main": "index.js", "dependencies": { @@ -19,7 +19,7 @@ "nyc": "^14.1.1" }, "engines": { - "node": ">=4.0" + "node": ">=6.0" }, "scripts": { "check-coverage": "nyc --check-coverage --statements=100 --reporter=lcov --reporter=text-summary npm run test",