Amazon DynamoDB
CreateMultiple
2 samples, from the least code that works to complete workflows.
What a CreateMultiple does
| Rule | On DynamoDB |
|---|---|
| Many items | CreateMultiple is all or nothing, in one TransactWriteItems of up to 100 items; more is ARX8001 unless new ArxDynamoWriteOptions { AllowPartial = true } (transactions of 100, one after another) |
The samples
Basics
The least code that works.
1Create many records in one callProgressiveMany items in one call, in three scenarios: all stored together, none stored when one fails, and more than 100.
Advanced cases
Dependency injection, transactions, batch scopes and setting the service up.
1Spread a hot partition with write shardingAdvancedWrite sharding for a hot partition, in two scenarios: page views of one page spread over four partitions, and read back as one partition, in order.