This package allows you to write AWS Lambda functions to transform incoming Amazon Kinesis Firehose source data and deliver the transformed data to destinations.
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/kinesisfirehoseevt"
"github.com/eawsy/aws-lambda-go-core/service/lambda/runtime"
)
func Handle(in *kinesisfirehoseevt.Input, ctx *runtime.Context) (kinesisfirehoseevt.Output, error) {
rcds := make([]*kinesisfirehoseevt.OutputRecord, 0)
for _, r := range in.Records {
log.Println(r)
rcds = append(rcds, &kinesisfirehoseevt.OutputRecord{
RecordID: r.RecordID,
Result: "Ok",
Data: r.Data,
})
}
return kinesisfirehoseevt.Output{Records: rcds}, nil
}