{"record":{"id":"c62870c630f59296","repo":"dotnet/orleans","slug":"configuration-for-dynamodbtransactionalstatestorag","errorCode":null,"errorMessage":"Configuration for DynamoDBTransactionalStateStorage {this.name} is invalid. TableName is not valid.","messagePattern":"Configuration for DynamoDBTransactionalStateStorage (.+?) is invalid\\. TableName is not valid\\.","errorType":"exception","errorClass":"OrleansConfigurationException","httpStatus":null,"severity":"error","filePath":"src/AWS/Orleans.Transactions.DynamoDB/Options/DynamoDBTransactionalStorageOptions.cs","lineNumber":98,"sourceCode":"    private readonly DynamoDBTransactionalStorageOptions options;\n    private readonly string name;\n\n    /// <summary>\n    /// Constructor\n    /// </summary>\n    /// <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":80,"sourceCodeEnd":113,"githubUrl":"https://github.com/dotnet/orleans/blob/fca799fa70ecb6ad975224271703ca43221f58de/src/AWS/Orleans.Transactions.DynamoDB/Options/DynamoDBTransactionalStorageOptions.cs#L80-L113","documentation":"Thrown by DynamoDBTransactionalStorageOptionsValidator.ValidateConfiguration when TableName is null/whitespace. DynamoDB transactional state requires a concrete table to store grain transaction metadata; an empty name means the options were not configured, and Orleans surfaces this as OrleansConfigurationException during validation (typically at silo startup).","triggerScenarios":"Calling AddDynamoDBTransactionalStateStorage without configuring TableName, or binding options from a config section where TableName is absent/blank. The validator runs during host build / silo lifecycle validation.","commonSituations":"Missing 'TableName' in the DynamoDBTransactionalStorage config section; typo in the key name; environment config not loaded; copy-paste from a non-transactional DynamoDB storage config that omits the table.","solutions":["Set TableName in DynamoDBTransactionalStorageOptions: configure options.UseDynamoDBTransactionalStateStorage(o => o.TableName = \"...\").","Confirm the config section name and key ('TableName') match exactly and are bound to the options.","Load environment-specific configuration (appsettings.{Env}.json, env vars) before validation.","Ensure the table exists in DynamoDB (or auto-create is enabled) once the name is set."],"exampleFix":"// before\nbuilder.AddDynamoDBTransactionalStateStorage(\"tx\", opt => { }); // no TableName -> validator throws\n\n// after\nbuilder.AddDynamoDBTransactionalStateStorage(\"tx\", opt =>\n{\n    opt.TableName = \"OrleansTransactionState\";\n    opt.Service = \"us-west-2\";\n});","handlingStrategy":"validation","validationCode":"if (string.IsNullOrWhiteSpace(options.TableName))\n    throw new OrleansConfigurationException(\"DynamoDBTransactionalStorage TableName is required.\");","typeGuard":"static bool IsValidTableName(string? s) => !string.IsNullOrWhiteSpace(s);","tryCatchPattern":"try { /* build silo */ }\ncatch (OrleansConfigurationException ex) when (ex.Message.Contains(\"TableName\"))\n{\n    logger.LogCritical(\"DynamoDB transactional storage TableName missing in config.\");\n    throw;\n}","preventionTips":["Set TableName in DynamoDBTransactionalStorageOptions.","Bind the config section and confirm the key name.","Validate at startup with an IConfigurationValidator."],"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"}