Skip to content

thepkg/awsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!
	}
}