Closed martinjlowm closed 2 years ago
I want to clarify here—the specific need you have is for lambda events, right? Not generalized for all structs necessarily? One thing you could do as a stopgap is use serde remote derive to derive serde onto the cloudwatch structs with the appropriate renames.
Yes, the need is specifically for the embedded API call via CloudTrail CloudWatch Lambda event where the request_parameters
field is a camelcased structure. I don't know if it is guaranteed, in all scenarios, that this inner structure always matches API calls that the SDKs are built upon. As for structs in this project, it would only be the *Input
structs in input::
.
I will have a look at the remote derive functionality - I didn't know about it. Thanks for pointing that out. :)
edit: well, since all models are non-exhaustive, I would have to implement every deserialization step manually using the builder pattern interface.
closed, dupe of #269
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Prerequisites
Question Description
https://github.com/LegNeato/aws-lambda-events currently offers structs for various Lambda inputs, but falls short when it comes to specific CloudWatch Events events, namely, API Calls via CloudTrail (for reference: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#events-for-services-not-listed).
All these calls seem to be available as input structs in the SDK but, for obvious reasons, don't depend on serde, meaning they cannot be plugged right in to type the Lambda CloudWatch events and be deserialized automatically (with camelCase renaming).
Are there any plans on supplying structs in a separate module (or perhaps even a separate crate) with serde (de-)serialization support? I think it's a bit out of scope for this project, but it also feels silly to maintain two almost identical structs in two different projects.
Platform/OS/Device
No response
Language Version
No response