dynamo

command
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2017 License: MIT Imports: 4 Imported by: 0

README

DynamoDB Example

The example program receives a DynamoDB event and prints a specific attribute's value to stdout.

Setup

Run the program locally:

go run main.go < event.json

Unmarshaling DynamoDB Records

DynamoDB uses a somewhat awkward notation to represent Attributes and Values in the event. It's a straight representation of the DynamoDB JSON which needs to be parsed to be useful.

In the example the AWS Go SDK is used to Unmarshal the Dynamo Attributes. These are stored in the struct newImage.

Depending on the event settings you could also Unmarshal record.Dynamodb.OldImage as needed.

This method of Unmarshalling is optional you may elect to handle record.Dynamodb.NewImage (etc) in another way.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL