File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ var shipper = require ( 'lambda-stash' ) ;
2
+
3
+ exports . handler = function ( event , context , callback ) {
4
+ var config = {
5
+ elasticsearch : {
6
+ host : 'https://search-abcdefghi.us-west-2.es.amazonaws.com' ,
7
+ index : 'logs' ,
8
+ region : 'us-west-2' ,
9
+ useAWS : true
10
+ } ,
11
+ mappings : [
12
+ {
13
+ bucket : 'my-cloudtrail-logs' ,
14
+ processors : [
15
+ 'decompressGzip' ,
16
+ 'parseJson' ,
17
+ 'formatCloudtrail' ,
18
+ 'shipElasticsearch'
19
+ ] ,
20
+ elasticsearch : {
21
+ type : 'cloudtrail'
22
+ } ,
23
+ dateField : 'date'
24
+ } ,
25
+ {
26
+ bucket : 'my-cloudfront-logs' ,
27
+ processors : [
28
+ 'decompressGzip' ,
29
+ 'parseTabs' ,
30
+ 'formatCloudfront' ,
31
+ 'shipElasticsearch'
32
+ ] ,
33
+ elasticsearch : {
34
+ type : 'cloudfront'
35
+ } ,
36
+ dateField : 'date'
37
+ }
38
+ ]
39
+ } ;
40
+ shipper . handler ( config , event , context , callback ) ;
41
+ } ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " lambda-stash-example" ,
3
+ "version" : " 1.0.0" ,
4
+ "description" : " Example deployment package for lambda-stash to AWS Lambda." ,
5
+ "main" : " index.js" ,
6
+ "dependencies" : {
7
+ "lambda-stash" : " *"
8
+ },
9
+ "private" : true
10
+ }
You can’t perform that action at this time.
0 commit comments