{"record":{"id":"cd15cf937129e0fe","repo":"BerriAI/litellm","slug":"litellm-error-trying-to-use-dynamodb-but-not-tabl","errorCode":null,"errorMessage":"LiteLLM Error, trying to use DynamoDB but not table name passed. Create a table and set `litellm.dynamodb_table_name=<your-table>`","messagePattern":"LiteLLM Error, trying to use DynamoDB but not table name passed\\. Create a table and set `litellm\\.dynamodb_table_name=<your-table>`","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/dynamodb.py","lineNumber":21,"sourceCode":"\nimport os\nimport traceback\nfrom typing import Any, Final\n\nimport litellm\nfrom litellm._uuid import uuid\n\n\nclass DyanmoDBLogger:\n    # Class variables or attributes\n\n    def __init__(self):\n        # Instance variables\n        import boto3\n\n        self.dynamodb: Any = boto3.resource(\"dynamodb\", region_name=os.environ[\"AWS_REGION_NAME\"])\n        if litellm.dynamodb_table_name is None:\n            raise ValueError(\n                \"LiteLLM Error, trying to use DynamoDB but not table name passed. Create a table and set `litellm.dynamodb_table_name=<your-table>`\"\n            )\n        self.table_name = litellm.dynamodb_table_name\n\n    async def _async_log_event(self, kwargs, response_obj, start_time, end_time, print_verbose):\n        self.log_event(kwargs, response_obj, start_time, end_time, print_verbose)\n\n    def log_event(self, kwargs, response_obj, start_time, end_time, print_verbose):\n        try:\n            print_verbose(f\"DynamoDB Logging - Enters logging function for model {kwargs}\")\n\n            # construct payload to send to DynamoDB\n            # follows the same params as langfuse.py\n            litellm_params: Final = kwargs.get(\"litellm_params\", {})\n            metadata: Final = litellm_params.get(\"metadata\", {}) or {}  # if litellm_params['metadata'] == None\n            messages: Final = kwargs.get(\"messages\")\n            optional_params: Final = kwargs.get(\"optional_params\", {})\n            call_type: Final = kwargs.get(\"call_type\", \"litellm.completion\")","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/dynamodb.py#L3-L39","documentation":"Error \"LiteLLM Error, trying to use DynamoDB but not table name passed. Create a table and set `litellm.dynamodb_table_name=<your-table>`\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/integrations/dynamodb.py:21 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create a DynamoDB table and set litellm.dynamodb_table_name to its name."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}