BerriAI/litellm · error · ValueError

AWSKeyManagementService V2 is an Enterprise Feature. Please

Error message

AWSKeyManagementService V2 is an Enterprise Feature. Please add a valid LITELLM_LICENSE to your envionment.

What it means

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.

Source

Thrown at litellm/secret_managers/aws_secret_manager.py:68

        self.validate_environment()
        self.kms_client = self.load_aws_kms(use_aws_kms=True)

    def validate_environment(
        self,
    ):
        if "AWS_REGION_NAME" not in os.environ:
            raise ValueError("Missing required environment variable - AWS_REGION_NAME")

        ## CHECK IF LICENSE IN ENV ## - premium feature
        is_litellm_license_in_env: bool = False

        if (
            os.getenv("LITELLM_LICENSE", None) is not None
            or os.getenv("LITELLM_SECRET_AWS_KMS_LITELLM_LICENSE", None) is not None
        ):
            is_litellm_license_in_env = True
        if is_litellm_license_in_env is False:
            raise ValueError(
                "AWSKeyManagementService V2 is an Enterprise Feature. Please add a valid LITELLM_LICENSE to your envionment."
            )

    def load_aws_kms(self, use_aws_kms: bool | None):
        if use_aws_kms is None or use_aws_kms is False:
            return
        try:
            import boto3

            validate_environment()

            # Create a Secrets Manager client
            kms_client: Final = boto3.client("kms", region_name=os.getenv("AWS_REGION_NAME"))

            return kms_client
        except Exception as e:
            raise e

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Obtain a LiteLLM Enterprise license and set LITELLM_LICENSE in the environment.
  2. If Enterprise is not available, use the non-V2 AWS KMS path or another supported secret manager.
  3. Fix the typo 'envionment' in the error string: it should read 'environment'.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/secret_managers/aws_secret_manager.py:68 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/a7d79d2dccd28043. Report an issue: GitHub.