0

I am not able to save list of objects in dynamodb by using mapper.batchSave() but I am able to save it single object at a time. I am not seeing any exception also in the logs, an idea why this is happening? Please help me to resolve this issue.

  • Hey Saswat. Please add the relevant code that is not working. Help us, help you. That said, keep in mind that you only can save _up to_ 25 items per batch save. Since you did not post any code or tell us which language/framework you use, it is hard to know if the framework does automatically send multiple requests if you save more than 25 items. – Jens Jan 10 '21 at 10:35
  • Sorry as the code has little confidential info not able to post the complete stack here. I am wring a serverless application with lambda function(Java) and dynamodb. i am using dynamdbmapper to save the data. I checked the size of list it fails with 9 records only ``` public void groupSave(final List lstTestObj) { LOGGER.debug("Saving Detail [{}]"+lstTestObj.size()); mapper.batchSave(lstTestObj); LOGGER.info("Saved Detail [{}]"); }``` – saswat satapathy Jan 10 '21 at 16:57
  • Saswat, please update the actual question if you have new information, instead of adding it as comment. Furthermore, the code you posted has little value. We need to know how many items you are trying to store and which frameworks/classes you are using. What class is your `mapper` object an instance of? Don't forget: we have absolutely no insight into what you are doing. If you want us to help you, you need to provide the relevant information. If there is confidential stuff in your code, then please strip it. – Jens Jan 10 '21 at 17:05

0 Answers0