{"record":{"id":"a7d79d2dccd28043","repo":"BerriAI/litellm","slug":"awskeymanagementservice-v2-is-an-enterprise-featur","errorCode":null,"errorMessage":"AWSKeyManagementService V2 is an Enterprise Feature. Please add a valid LITELLM_LICENSE to your envionment.","messagePattern":"AWSKeyManagementService V2 is an Enterprise Feature\\. Please add a valid LITELLM_LICENSE to your envionment\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/secret_managers/aws_secret_manager.py","lineNumber":68,"sourceCode":"        self.validate_environment()\n        self.kms_client = self.load_aws_kms(use_aws_kms=True)\n\n    def validate_environment(\n        self,\n    ):\n        if \"AWS_REGION_NAME\" not in os.environ:\n            raise ValueError(\"Missing required environment variable - AWS_REGION_NAME\")\n\n        ## CHECK IF LICENSE IN ENV ## - premium feature\n        is_litellm_license_in_env: bool = False\n\n        if (\n            os.getenv(\"LITELLM_LICENSE\", None) is not None\n            or os.getenv(\"LITELLM_SECRET_AWS_KMS_LITELLM_LICENSE\", None) is not None\n        ):\n            is_litellm_license_in_env = True\n        if is_litellm_license_in_env is False:\n            raise ValueError(\n                \"AWSKeyManagementService V2 is an Enterprise Feature. Please add a valid LITELLM_LICENSE to your envionment.\"\n            )\n\n    def load_aws_kms(self, use_aws_kms: bool | None):\n        if use_aws_kms is None or use_aws_kms is False:\n            return\n        try:\n            import boto3\n\n            validate_environment()\n\n            # Create a Secrets Manager client\n            kms_client: Final = boto3.client(\"kms\", region_name=os.getenv(\"AWS_REGION_NAME\"))\n\n            return kms_client\n        except Exception as e:\n            raise e\n","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/secret_managers/aws_secret_manager.py#L50-L86","documentation":"Enterprise-features gate inside AWSKeyManagementService V2's validate_environment: after confirming AWS_REGION_NAME, it checks for LITELLM_LICENSE (or LITELLM_SECRET_AWS_KMS_LITELLM_LICENSE) in the environment and rejects non-enterprise deployments from using AWS KMS key decryption.","triggerScenarios":"Thrown at litellm/secret_managers/aws_secret_manager.py:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Obtain a LiteLLM Enterprise license and set LITELLM_LICENSE in the environment.","If Enterprise is not available, use the non-V2 AWS KMS path or another supported secret manager.","Fix the typo 'envionment' in the error string: it should read 'environment'."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}