{"record":{"id":"4f97f2ee43bb2e27","repo":"BerriAI/litellm","slug":"failed-to-get-async-invoke-status-response-statu","errorCode":null,"errorMessage":"Failed to get async invoke status: {response.status_code} - {response.text}","messagePattern":"Failed to get async invoke status: (.+?) - (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/embed/embedding.py","lineNumber":652,"sourceCode":"        response: Final = await client.get(\n            url=prepped.url,\n            headers=prepped.headers,\n        )\n\n        # LOGGING\n        if logging_obj is not None:\n            logging_obj.post_call(\n                input=invocation_arn,\n                api_key=\"\",\n                original_response=response,\n                additional_args={\"complete_input_dict\": {\"invocation_arn\": invocation_arn}},\n            )\n\n        # Parse response\n        if response.status_code == 200:\n            return response.json()\n        else:\n            raise Exception(f\"Failed to get async invoke status: {response.status_code} - {response.text}\")\n","sourceCodeStart":634,"sourceCodeEnd":653,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/bedrock/embed/embedding.py#L634-L653","documentation":"After GETting /async-invoke/{arn} to poll a Bedrock async invocation, the response status was not 200 and LiteLLM raises a generic Exception embedding the status code and body. The AWS body carries the real reason (auth failure on the status route, nonexistent/completed-and-expired invocationArn, wrong region).","triggerScenarios":"Polling an invocationArn that was mistyped, URL-decoded incorrectly, expired, or belongs to another region; SigV4 signing credentials lacking bedrock:GetAsyncInvoke permission; endpoint_url pointing at the wrong region host.","commonSituations":"Persisting the ARN across process restarts after the invocation record expired; IAM policy granting InvokeModel but not the async-invoke read action; region mismatch between invoke and poll calls.","solutions":["Read the response text in the exception — it disambiguates 403 (permissions), 404 (unknown ARN/region), 400 (malformed ARN).","Confirm aws_region_name for the poll matches the region the async invoke was created in.","Add bedrock async-invoke read permissions to the IAM role.","Re-trigger the async invoke to obtain a fresh invocationArn if the old one expired."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    status = get_async_invoke_status(invocation_arn=arn, ...)\nexcept Exception as e:\n    msg = str(e)\n    if \"404\" in msg:\n        restart_async_invoke()  # ARN expired or wrong region\n    elif \"403\" in msg:\n        fix_iam_for_async_invoke_read()\n    else:\n        raise","preventionTips":["Persist invocationArn with its region and re-poll in the same region.","Grant the full bedrock async-invoke IAM action set, not just InvokeModel.","Treat 404 on poll as 're-submit', not as retryable."],"tags":["bedrock","async-invoke","aws","polling"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}