Skip to content

Added conversion to AttributeValue model of original dynamodb sdk #183

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

Closed
wants to merge 1 commit into from
Closed

Added conversion to AttributeValue model of original dynamodb sdk #183

wants to merge 1 commit into from

Conversation

jente-peeraer-cloudway
Copy link

Issue #, if available: 182

Description of changes: Added conversion to AttributeValue model of original dynamodb sdk (com.amazonaws.services.dynamodbv2.model.AttributeValue)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jente-peeraer-cloudway
Copy link
Author

Is there any additional data needed in order to approve this PR?

@carlzogh
Copy link
Contributor

carlzogh commented Nov 5, 2020

Hey @jente-peeraer-cloudway - the initial version of this library was written for SDK v1.

Does version 1.0.0 help with your use-case? https://search.maven.org/artifact/com.amazonaws/aws-lambda-java-events-sdk-transformer/1.0.0

Otherwise we can revisit this and look into supporting both SDK v1 and v2 across the different models in the library, I think if we were to go down that road we'd want to add support for all models not just AttributeValue

@francis-a
Copy link

@carlzogh I'm also running into this issue, it seems like an oversight honestly.

With this SDK we have two versions of AttributeValue.

com.amazonaws.services.lambda.runtime.events.models.dynamodb::AttributeValue and com.amazonaws.services.dynamodbv2.model::AttributeValue. While on a source code level they look identical from the DynamoDB SDK's perspective they aren't. Even more surprising is that the com.amazonaws.services.lambda.runtime.events.models.dynamodb version looks to be a copy and paste from the DynamoSDK since even the documentation references the Dynamo SDK docs.

I looked into your suggestion and it seems like version 1.0.0 of the transformer SDK still only converts between the DyanmoDB SDK V2 models so it doesn't look like ti can help out here. Due to this it seems like the PR from @jente-peeraer-cloudway is still valid.

I really think this SDK should either use the Dynamo SDK model directly or supply some kind of conversion. Without this for stream converters it's actually easier to go without the typing provided.

@carlzogh
Copy link
Contributor

carlzogh commented Dec 8, 2020

Thanks for highlighting this - I've put in a PR with a different approach to not only support AttributeValue but the entire V1 DDB SDK models suite (ref. #195)

Will close out this one, thanks again!

@carlzogh carlzogh closed this Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants