This package allows you write AWS Lambda functions to perform custom processing and analysis on real-time feed of log events from Amazon CloudWatch Logs.
For step by step instructions on how to author your AWS Lambda function code in Go, see eawsy/aws-lambda-go-shim.
go get -u -d github.com/eawsy/aws-lambda-go-event/...
package main
import (
"log"
"github.com/eawsy/aws-lambda-go-event/service/lambda/runtime/event/cloudwatchlogsevt"
"github.com/eawsy/aws-lambda-go-core/service/lambda/runtime"
)
func Handle(evt *cloudwatchlogsevt.Event, ctx *runtime.Context) (interface{}, error) {
for _, rec := range evt.Records {
log.Println(rec)
}
return nil, nil
}