Use MessageAttributeValue in event types
- Dominant language
- Go
- Stars
- 3.8k
- Forks
- 578
- Avg merge
- 8h 18m
- Merged PRs (30d)
- 1
Description
**Is your feature request related to a problem? Please describe.**
MessageAttribute on SNSEntity is defined with type `map[string]interface{}` instead of `map[string]MessageAttributeValue` which makes parsing attribute values out of an SNS entity rather cumbersome:
```go
attr := entity.MessageAttributes["foo"]
attrVal := attr.(map[string]interface{})
stringValue := attrVal["StringValue"]
```
**Describe the solution you'd like**
Change the type of the `MessageAttributes` so that the map values are `MessageAttributeValue`s.
**Describe alternatives you've considered**
Marshal the MessageAttributes to JSON and then Unmarshall to `map[string]MessageAttributeValue`, but this seems wasteful.
This is similar to issue #58 .
Contributor guide
Assessment
This issue has not been assessed yet.