Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Latest commit

 

History

History

kinesisfirehoseevt

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Amazon Kinesis Firehose Events

Back to Home Go Doc AWS Doc

This package allows you to write AWS Lambda functions to transform incoming Amazon Kinesis Firehose source data and deliver the transformed data to destinations.

Quick Hands-On

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
}