{"record":{"id":"f6ca2a0e598ba9ce","repo":"BerriAI/litellm","slug":"oidc-token-could-not-be-retrieved-from-secret-mana-f6ca2a","errorCode":null,"errorMessage":"OIDC token could not be retrieved from secret manager.","messagePattern":"OIDC token could not be retrieved from secret manager\\.","errorType":"exception","errorClass":"AwsAuthError","httpStatus":401,"severity":"error","filePath":"litellm/llms/bedrock/base_aws_llm.py","lineNumber":832,"sourceCode":"            aws_role_name,\n            aws_session_name,\n        )\n\n        # get_secret() expands environment-variable references (an os.environ/<VAR>\n        # prefix, or a bare name matching an environment variable). Config-sourced\n        # references are expanded at load time, so such a reference reaching here is\n        # caller-supplied input; reject it rather than expanding a process-environment\n        # value for use as the token.\n        if aws_web_identity_token.startswith(\"os.environ/\") or aws_web_identity_token in os.environ:\n            raise AwsAuthError(\n                message=\"Invalid web identity token reference.\",\n                status_code=400,\n            )\n\n        oidc_token: Final = get_secret(aws_web_identity_token)\n\n        if oidc_token is None:\n            raise AwsAuthError(\n                message=\"OIDC token could not be retrieved from secret manager.\",\n                status_code=401,\n            )\n\n        sts_client_kwargs: Final = self._build_sts_client_kwargs(\n            aws_sts_endpoint=aws_sts_endpoint,\n            ssl_verify=ssl_verify,\n        )\n\n        with tracer.trace(\"boto3.client(sts)\"):\n            sts_client: Final = boto3.client(\"sts\", **sts_client_kwargs)\n\n        # The session policy is an IAM PERMISSION CEILING — effective\n        # permissions are the intersection of the role's identity policies\n        # and this policy. Any action not listed here is silently denied\n        # even when the IAM role grants it. So every Bedrock route we\n        # support needs a matching action statement, or it 403s on OIDC\n        # auth only (static creds + IRSA take other code paths).","sourceCodeStart":814,"sourceCodeEnd":850,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/bedrock/base_aws_llm.py#L814-L850","documentation":"Runtime failure in AWS web-identity authentication: get_secret() could not retrieve the OIDC token from the configured secret manager, so there is no web identity token to exchange for STS credentials. The secret reference or backend connectivity is at fault.","triggerScenarios":"Thrown at litellm/llms/bedrock/base_aws_llm.py:832 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the OIDC token exists in the configured secret manager and is accessible.","Check IAM permissions allow reading the secret.","Confirm the secret name/ARN for the OIDC token is correct."],"exampleFix":null,"handlingStrategy":"try-catch","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-23T08:17:48.524Z"}