AWS DynamoDB SDK 2.x - can I reuse DynamoDbMapper's annotations?

849 views Asked by At

We have quite a few entities written for AWS DynamoDbMapper.

I have found that 2.x offers "DynamoDbEnhancedClient".

However that does not seem to have some features, for instance, automatic table creation from a class, like generateCreateTableRequest(clazz). Or am I mistaken?

Reference: https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/dynamodb/model/CreateTableRequest.Builder.html

Ideally, I would like to feed this "enhanced client" the old class with unchanged annotations and get the same table created as with generateCreateTableRequest() from SDK 1.x.

Note that I do not mean just the mapping, like this:

private static final DynamoDbTable<Customer> CUSTOMER_TABLE =
    client.table("customers_table", TableSchema.fromBean(Customer.class));
0

There are 0 answers