{"record":{"id":"4414f175dcb0394a","repo":"dotnet/orleans","slug":"configuration-for-dynamodbtransactionalstatestorag-4414f1","errorCode":null,"errorMessage":"Configuration for DynamoDBTransactionalStateStorage {this.name} is invalid. ReadCapacityUnits is not valid.","messagePattern":"Configuration for DynamoDBTransactionalStateStorage (.+?) is invalid\\. ReadCapacityUnits is not valid\\.","errorType":"exception","errorClass":"OrleansConfigurationException","httpStatus":null,"severity":"error","filePath":"src/AWS/Orleans.Transactions.DynamoDB/Options/DynamoDBTransactionalStorageOptions.cs","lineNumber":104,"sourceCode":"    /// <param name=\"options\">The option to be validated.</param>\n    /// <param name=\"name\">The option name to be validated.</param>\n    public DynamoDBTransactionalStorageOptionsValidator(DynamoDBTransactionalStorageOptions options, string name)\n    {\n        this.options = options;\n        this.name = name;\n    }\n\n    /// <inheritdoc />\n    public void ValidateConfiguration()\n    {\n        if (string.IsNullOrWhiteSpace(this.options.TableName))\n            throw new OrleansConfigurationException(\n                $\"Configuration for DynamoDBTransactionalStateStorage {this.name} is invalid. {nameof(this.options.TableName)} is not valid.\");\n\n        if (this.options.UseProvisionedThroughput)\n        {\n            if (this.options.ReadCapacityUnits == 0)\n                throw new OrleansConfigurationException(\n                    $\"Configuration for DynamoDBTransactionalStateStorage {this.name} is invalid. {nameof(this.options.ReadCapacityUnits)} is not valid.\");\n\n            if (this.options.WriteCapacityUnits == 0)\n                throw new OrleansConfigurationException(\n                    $\"Configuration for DynamoDBTransactionalStateStorage {this.name} is invalid. {nameof(this.options.WriteCapacityUnits)} is not valid.\");\n        }\n    }\n}\n","sourceCodeStart":86,"sourceCodeEnd":113,"githubUrl":"https://github.com/dotnet/orleans/blob/fca799fa70ecb6ad975224271703ca43221f58de/src/AWS/Orleans.Transactions.DynamoDB/Options/DynamoDBTransactionalStorageOptions.cs#L86-L113","documentation":"Thrown by DynamoDBTransactionalStorageOptionsValidator.ValidateConfiguration when UseProvisionedThroughput is true but ReadCapacityUnits is 0. Provisioned throughput mode requires explicit capacity units; a zero value is invalid for DynamoDB, so the validator rejects the configuration at startup before any operation.","triggerScenarios":"Enabling UseProvisionedThroughput while leaving ReadCapacityUnits at its default 0, or setting it explicitly to 0. The validator runs during configuration validation at silo startup.","commonSituations":"Copying a template that sets UseProvisionedThroughput=true but omits capacity units; toggling to provisioned mode from on-demand without filling in capacity; misreading the option as optional.","solutions":["Set ReadCapacityUnits to a positive value when UseProvisionedThroughput is true.","If you want on-demand billing, leave UseProvisionedThroughput = false instead.","Right-size the value from observed read load and DynamoDB consumption metrics.","Add a config sanity check in your deployment pipeline for provisioned capacity > 0."],"exampleFix":"// before\nopt.UseProvisionedThroughput = true; // ReadCapacityUnits default 0 -> validator throws\n\n// after\nopt.UseProvisionedThroughput = true;\nopt.ReadCapacityUnits = 50;\nopt.WriteCapacityUnits = 25;","handlingStrategy":"validation","validationCode":"if (options.UseProvisionedThroughput && options.ReadCapacityUnits <= 0)\n    throw new OrleansConfigurationException(\"ReadCapacityUnits must be > 0 when provisioned.\");","typeGuard":null,"tryCatchPattern":"try { /* build silo */ }\ncatch (OrleansConfigurationException ex) when (ex.Message.Contains(\"ReadCapacityUnits\"))\n{\n    logger.LogCritical(\"Set DynamoDB ReadCapacityUnits > 0 or disable provisioned throughput.\");\n    throw;\n}","preventionTips":["Set ReadCapacityUnits when enabling provisioned throughput.","Prefer on-demand mode unless capacity is planned.","Add a pipeline check for provisioned capacity > 0."],"tags":["aws","dynamodb","transactions","configuration","orleans"],"backgroundTag":null,"analyzedSha":"fca799fa70ecb6ad975224271703ca43221f58de","analyzedAt":"2026-08-13T19:55:57.938Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}