I'm trying to write a DAO for DynamoDB using Java 8 and there seems to be several ways. Classes are primarily defined under the following two packages:
com.amazonaws.services.dynamodbv2
software.amazon.awssdk.services.dynamodb
Both of them appear to be doing what I'd like - but since I'm starting fresh, I'd rather choose the latest one
I've looked at these two links:
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GettingStarted.Java.03.html
https://docs.aws.amazon.com/sdk-for-java/v2/migration-guide/whats-different.html
The thing that confuses the most is that the com.amazonaws.services.dynamodbv2.AmazonDynamoDB
says v2 and software.amazon.awssdk.services.dynamodb.DynamoDbClient
doesn't.
The DynamoDB JDBC Driver is a powerful tool that allows you to easily connect-to live Amazon DynamoDB data through any JDBC capable application or tool! With the Driver users can access Amazon DynamoDB the same way that they would connect to any other JDBC data source.
This article shows how to access Amazon DynamoDB data using an Entity Framework code-first approach. Entity Framework 6 is available in . NET 4.5 and above. Entity Framework is an object-relational mapping framework that can be used to work with data as objects.
You can store a JSON document as an attribute in a DynamoDB table. To do this, use the withJSON method of Item . This method parses the JSON document and maps each element to a native DynamoDB data type.
The aws-sdk-java-v2 repository uses the package name software.amazon.awssdk
whereas v1 of the Java SDK uses com.amazonaws
. v2 was written with Java 1.8 features in mind, making it a lot easier to develop with over v1.
I personally recommend using v2 over v1 where possible, even though both SDKs are still actively maintained on GitHub. However, there may be features that are missing from v2 that are contained in v1, so it's possible that you'll end up adding both as dependencies to your project.
To answer your question, com.amazonaws.services.dynamodbv2
is a package in v1 of the Java SDK, as seen here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With