SAM Doctor

ERROR REFERENCE

Bedrock received an empty modelId

The Bedrock Runtime client rejected the InvokeModel request before inference because the required model identifier was an empty string. Fix the request value before changing IAM or model access.

WHAT IT MEANS

The request could not be serialized

operation error Bedrock Runtime: InvokeModel, serialization failed: serialization failed: input member modelId must not be empty

The SDK validates the required modelId member locally. The call may never have reached Bedrock, so this message does not prove that a model is unavailable or that the caller lacks permission.

NEXT CHECK

Pass the model identifier deliberately

  1. Trace the value. Find the environment variable, config file, or backend selection that supplies modelId and check for a missing name or empty default.
  2. Use the exact identifier. Set a base-model ID, inference-profile ID, provisioned-model ARN, or custom-model ID supported in the target Region. Do not use a display name.
  3. Retry the same operation. Log only the sanitized request shape, then investigate model access or IAM only after a non-empty identifier reaches the SDK.

AUTOMATE THE TRIAGE

Keep the check in your normal workflow

SAM Doctor recognizes the exact empty-modelId serialization marker with medium confidence and points at the request builder. Runs locally; no AWS access, no log upload.

python -m pip install sam-doctor
sam-doctor diagnose deployment.log --format markdown

RELATED

OFFICIAL REFERENCE

Amazon Bedrock API

InvokeModel API reference - modelId is required for the operation.