Skip to content

Unmarshalling DynamoDB streams event: events.DynamoDBAttributeValue #1554

@kaihendry

Description

@kaihendry

Describe the issue with documentation

cannot use record.OldImage (variable of type map[string]events.DynamoDBAttributeValue) as map[string]"github.com/aws/aws-sdk-go-v2/service/dynamodb/types".AttributeValue value in argument to attributevalue.UnmarshalMap

Suggestion

https://aws.github.io/aws-sdk-go-v2/docs/code-examples/dynamodb/ is very light.

We need some serious examples, like saving removed dynamodb Items via DynamoDB streams.

I am puzzled how to unmarshal https://pkg.go.dev/github.com/aws/aws-lambda-go@v1.28.0/events?utm_source=gopls#DynamoDBStreamRecord.OldImage using https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue@v1.5.0?utm_source=gopls#UnmarshalMap ... are they not effectively the same?

I'm very confused.

AWS Go SDK version used

v1.23.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidanceQuestion that needs advice or information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions