Replies: 1 comment 1 reply
-
Unfortunately, in the general case, we can't share types between services. Although the types are currently identical, on the AWS side these types aren't actually coupled (eg. in the future, dynamodbstreams could add another variant to attribute value that wasn't present in However, I absolutely agree that we should try to help customers use these types between services without too much friction (perhaps by providing an additional crate like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Community Note
Tell us about your request
As more services are supported by the SDK, please don't duplicate types common to multiple services. The type that brought this to my attention is the DynamoDB
AttributeValue
type.Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
As a current user of Rusoto for DynamoDB and DynamoDB Streams, I have been frustrated that they have separate (but identical) implementations for the
AttributeValue
types used to represent data in both of those services.Rusoto has the DynamoDB type here, while the DynamoDB Streams type is here.
Are you currently working around this issue?
I have a function that converts from a
rusoto_dynamodbstreams::AttributeValue
to arusoto_dynamodb::AttributeValue
so that I can use existing tooling forrusoto_dynamodb::AttributeValue
(likeserde_dynamo
). So wherever I need to deal with arusoto_dynamodbstreams::AttributeValue
, I convert it first, then deal with it like therusoto_dynamodb::AttributeValue
it should be.Additional context
I know this isn't yet a problem in this repo. I just want to make sure that it doesn't become one. Seeing the
AttributeValue
type defined indynamodb::model
made me concerned thatdynamodbstreams::model::AttributeValue
might exist in the future.Beta Was this translation helpful? Give feedback.
All reactions