Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.56 KB

README.md

File metadata and controls

37 lines (29 loc) · 1.56 KB

awsl (AWS Lambda)

CircleCI Build Status Go Report Card Coverage Status GoDoc DependaBot PRs Welcome

Package awsl provides helpful functions to work with AWS Lambda.

Installation

go get -u github.com/thepkg/awsl

Usage

  • FromDynamoDBMap - converts data from AWS Lambda Event for DynamoDB to regular map (from map[string]events.DynamoDBAttributeValue to map[string]interface{}):
func main() {
	lambda.Start(Handler)
}

func Handler(event events.DynamoDBEvent) {
	for _, record := range event.Records {
		rec := awsl.FromDynamoDBMap(record.Change.NewImage)
		// rec contains map[string]interface{} so it's easier to work with data!
	}
}