Skip to content

thepkg/awsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

42db9b7 · Oct 21, 2022

History

46 Commits
Oct 21, 2022
Oct 21, 2022
Nov 22, 2019
Nov 22, 2019
Nov 22, 2019
Oct 21, 2022
Nov 22, 2019
Nov 22, 2019
Nov 22, 2019
Oct 21, 2022
Oct 21, 2022

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