BerriAI/litellm · error · Exception

Failed to get async invoke status: {response.status_code} -

Error message

Failed to get async invoke status: {response.status_code} - {response.text}

What it means

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).

Source

Thrown at litellm/llms/bedrock/embed/embedding.py:652

        response: Final = await client.get(
            url=prepped.url,
            headers=prepped.headers,
        )

        # LOGGING
        if logging_obj is not None:
            logging_obj.post_call(
                input=invocation_arn,
                api_key="",
                original_response=response,
                additional_args={"complete_input_dict": {"invocation_arn": invocation_arn}},
            )

        # Parse response
        if response.status_code == 200:
            return response.json()
        else:
            raise Exception(f"Failed to get async invoke status: {response.status_code} - {response.text}")

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. Read the response text in the exception — it disambiguates 403 (permissions), 404 (unknown ARN/region), 400 (malformed ARN).
  2. Confirm aws_region_name for the poll matches the region the async invoke was created in.
  3. Add bedrock async-invoke read permissions to the IAM role.
  4. Re-trigger the async invoke to obtain a fresh invocationArn if the old one expired.
Defensive patterns

Strategy: try-catch

Try / catch

try:
    status = get_async_invoke_status(invocation_arn=arn, ...)
except Exception as e:
    msg = str(e)
    if "404" in msg:
        restart_async_invoke()  # ARN expired or wrong region
    elif "403" in msg:
        fix_iam_for_async_invoke_read()
    else:
        raise

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15). Data as JSON: /api/errors/4f97f2ee43bb2e27. Report an issue: GitHub.