Take a look at the official docs:
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.concepts.html
Java specific example here:
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.client.run-application-java.html