-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of Struct Conversion to DynamoDB Attribute Item HashMap #1172
Comments
Hi Jon, thanks for the feature request! Does the serde_dynamo crate cover your needs or is there something beyond that that the SDK could provide? |
Hi Landon, Thank you for your response, I am not super familiar with serde_dynamo crate but I do see it covers what I am trying to implement here. However, I was thinking about tighter integration directly within aws-sdk-rust. I think having built-in support for this conversion within the SDK would reduce the need for extra dependencies and ensure compatibility and consistency with the rest of the SDK. That being said, if you believe using serde_dynamo is the way to go, I am open to using it |
For now There is currently a feature in the works for better integration with serde decorators in our codegen. Technically this feature is a generic codegen thing and initially won't be enabled for the generated AWS SDKs. But if it would be useful we could discuss enabling it (perhaps behind a feature flag) for users. |
Just to clarify, the in progress feature is not exactly this. What is desired is actually an implementation of |
Describe the feature
Implement a utility in aws-sdk-rust that converts structs to DynamoDB attribute items. This feature aims to simplify the process of serializing Rust data structures into the format required by DynamoDB for storage and retrieval.
Use Case
I want to easily convert my Rust structs into DynamoDB attribute items so that I can efficiently store and retrieve complex data structures without manually handling each field's conversion or using 3rd party libraries.
Proposed Solution
Take a reference to a serializable struct and return a HashMap with String keys and AttributeValue values.
example usage
Other Information
I am not entirely sure if this feature is viable or a good approach. Therefore, I am very open to suggestions and improvements. Any feedback or advice on how to better implement this would be greatly appreciated
Acknowledgements
A note for the community
Community Note
The text was updated successfully, but these errors were encountered: