ERROR REFERENCE
Bedrock says the messages field is required
The selected Anthropic Claude request reached Bedrock, but its
model-specific body omitted the required messages field.
Correct the request shape before changing model access or IAM.
WHAT IT MEANS
The model body does not match the Messages API
operation error Bedrock Runtime: InvokeModel, https response error StatusCode: 400, ValidationException: messages: Field required
Bedrock model invocation bodies are model-specific. For the Anthropic
Claude Messages API, messages is a required array of
conversation turns; the field is separate from the top-level
modelId request member.
NEXT CHECK
Send the body format the selected model expects
-
Confirm the model and operation. Check that the
selected model supports the Anthropic Claude Messages API and that
the code is calling
InvokeModelwith its native body format rather than an OpenAI-styleprompt. -
Add the required fields. For Claude Messages,
include
anthropic_version: "bedrock-2023-05-31", a positivemax_tokens, and amessagesarray whose turns containroleandcontent. -
Check the serialized payload. Log only the request
keys and sanitized values, then verify that middleware or an
adapter did not rename or drop
messagesbefore sending. - Retry the same call. Investigate model access or IAM only after the request body passes the model's schema.
AUTOMATE THE TRIAGE
Keep the check in your normal workflow
SAM Doctor recognizes the Bedrock messages: Field required
marker with medium confidence and points at the model-specific request
body. Runs locally; no AWS access, no log upload.
python -m pip install sam-doctor
sam-doctor diagnose deployment.log --format markdown
RELATED
Related errors
- Bedrock empty modelId - pass the required model identifier before validating the body.
- Bedrock empty system prompt - omit an empty Converse system content block.
- Bedrock model identifier unresolved - compare the exact ID, Region, endpoint, and API after the request shape is valid.
OFFICIAL REFERENCE
Anthropic Claude Messages API
Request and response parameters - AWS lists messages as required for a Claude Messages request.