Hi I was just wondering if someone could give me clarification on the benefits of batchwrite
If we have let's say 36 items we want to write to dynamodb, i'm using a AWS lambda function and the way I see it I have two options (Pseudo code)
Option One
for item in items:
putItem(item)
Option two
for item in items:
if cnt < 25
batch.push(item)
if cnt == 25
batchWrite(batch)
cnt = 0
cnt++
I feel like option one is quick and dirty but if my items would rarely go over 100 is it that bad (would I time out my lambda etc ..) ?
Anyway best practice clarification on this would be great.