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
- 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.
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
- 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.
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
- Model needs to be set for bedrock
- BedrockException: Context Window Error - {error_str}
- BedrockException Invalid Authentication - {error_str}
- BedrockException PermissionDeniedError - {error_str}
- BedrockException: Rate Limit Error - {error_str}
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/4f97f2ee43bb2e27.
Report an issue: GitHub.