Setup and Use a DynamoDB Test Container with the AWS Java SDK 2.0
The source code for this article can be found on Github.
Using embedded dynamodb for testing is, in my experience, kind of flakey and unpredictable. Because of the weird way it pulls in SQLite on a per operating system basis, it can sometimes work locally and not work on the build server. Sometimes it’s just not working for some unexplained reason and wiping the directory that the code is in and re-cloning fixes it. Not a fun time.