Skip to content

Bedrock DocumentSource with s3Location throws validation error #7732

@stabbylambda

Description

@stabbylambda

Checkboxes for prior research

Describe the bug

I’m attempting to use the Bedrock DocumentSource to analyze a PDF stored in s3. I’ve tried with both InvokeModel and Converse but regardless of what command is used, the server returns a validation exception:

ValidationException: The model returned the following errors: messages.0.content.0.document.source.type: Field required

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/client-bedrock-runtime@3.987.0

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v24.5.0

Reproduction Steps

analyze-pdf-bedrock.ts

Observed Behavior

error.txt

Expected Behavior

According to the documentation, Bedrock should be able to grab the file from S3 and send it to the model.

Possible Solution

No response

Additional Information/Context

No response

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.p2This is a standard priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions