Dynamodb: Improved batch_insert algorithm

- [ ] @mikeklein13 
- [ ] @be-dmitry