Skip to content

NodeJS AWS Lambda script for pushing gzipped Cloud Front log files stored in Amazon S3 to Loggly as JSON objects.

License

Notifications You must be signed in to change notification settings

fgheorghe/cloudfront2loggly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloudfront2loggly

NodeJS AWS Lambda script for pushing gzipped Cloud Front log files stored in Amazon S3 to Loggly as JSON objects.

How to use

  • Clone the repository and install dependencies:
npm install
  • Configure Loggly by editing cloudfront2loggly.js and changing:
logglyConfig = {
    tag: "TAG_NAME",
    token: "ACCESS_TOKEN"
};
  • Compress the code and upload to AWS Lambda:
zip -r cloudfront2loggly cloudfront2loggly.js node_modules

Further reading

For more details about AWS Lambda and Loggly, please read:

Developer notes

To alter log data, before pushing to Loggly, change the data object at these lines:

// To alter data (i.e. remove sensitive log content), alter the data object before issuing request.post.
function(data) {
    [...]
}

About

NodeJS AWS Lambda script for pushing gzipped Cloud Front log files stored in Amazon S3 to Loggly as JSON objects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published