fogfish / dynamo

Generic Golang Key/Value trait for AWS storage services
MIT License
19 stars 5 forks source link

Can't use Put for dynamodb #35

Closed whiteshadoww closed 3 years ago

whiteshadoww commented 3 years ago

ValidationException: One or more parameter values are not valid. The AttributeValue for a key attribute cannot contain an empty string value. Key: prefix

fogfish commented 3 years ago

Thank you for the report and apologise on the delay! The issue is caused either by missing the ID definition in the type or its value is not defined. In order to support hierarchical relations the library exposes a strict schema on the identity of entries.

Here is the example of the type definition

type Person struct {
  dynamo.ID
  Name    string `dynamodbav:"name,omitempty"`
  Age     int    `dynamodbav:"age,omitempty"`
  Address string `dynamodbav:"address,omitempty"`
}

Could please share your type definition and code snippet about the instantiation of the type?

fogfish commented 3 years ago

closed by #38