Member-only story

Localstack

Use Localstack to test integrate with DynamoDB in Java

Localstack is a good tool to test whether your app works with AWS services. In this example we will resolve the issue why we run the app in Localstack but the application try to connect with the real DynamobD in aws instead.

Donald Le

--

Photo by Dario Mueller on Unsplash

Previously the code for implementation AWS DynamoDB in Java is like this.

Running this code with Localstack will show error that cannot save data in DynamoDB because it can’t connect to the real DynamoDB in AWS.

So we have to change to this instead

~~Hope it helps~~

~~Happy coding~~

--

--

No responses yet