Ship AWS Logs (CF, ALB, ELB, S3) stored in S3 to Cloudwatch (or others)
This module lets you ship AWS Logs from services that are only able to store them in an S3 Bucket (pretty useless) to other Services (e.g. Cloudwatch).
It ships the Data as JSON encoded String (so easy for every System afterwards)
yarn add aws-log-shipper
const logShipper = require("aws-log-shipper");
module.exports.handler = logShipper.default;
Then configure your Lambda to use index.handler
as handler endpoint.
You should invoke this Lambda with s3:PutEvent
Bucket Notification of those Logfiles.
currently we can ship logs from the following services:
we configure the Lambda with ENV
vars completely
SHIPPER
: where to ship the logs (atm the only option is cloudwatch
)CF_LOG_GROUP
: which Cloudwatch Loggroup to use for Cloudfront logsALB_LOG_GROUP
: which Cloudwatch Loggroup to use for ALB logsELB_LOG_GROUP
: which Cloudwatch Loggroup to use for ELB logsS3_LOG_GROUP
: which Cloudwatch Loggroup to use for S3 logsthis was just a quick evening hack, so most things are a bit rough