After a code change, every Bedrock call fails immediately with a ValidationException. Where do you start?
- Exam domain
- Testing, Validation, and Troubleshooting11% of the exam
- Difficulty
- Medium
- In this mock
- 13 questions on this domainPractise this domain
Why the exam asks this
Task 5.2: Troubleshoot GenAI applications.
Objective in the exam guide: Skill 5.2.2: Diagnose and resolve FM integration issues to identify and fix API integration problems specific to GenAI services (for example, by using error logging, request validation, response analysis).
Reading error types correctly separates a five-minute fix from a day of chasing the wrong cause. Validation and throttling errors need opposite responses.
Why D is the answer
Check the request against the API specification: model ID, parameter names and body format, using error logs
A validation error means the request itself is malformed, so inspect what changed in the request.
Remember: Validation errors mean a bad request: compare it with the API specification.
How it works
Bedrock returns different error types for different problems.
A ValidationException means the request does not match what the API expects, such as a wrong model ID, parameter or body format.
Throttling errors are different: they mean the request was valid but exceeded a rate or quota, and call for backoff.
Clues in the question
The words that point to the answer, and what each one tells you.
- After a code change
- The request probably changed.
- Fails immediately with a ValidationException
- A malformed request, not a capacity issue.
In detail
- Throttling errors call for backoff and quotas; validation errors call for fixing the request.
- Logging the request body, without sensitive data, speeds diagnosis.
Side by side with look-alikes
| Error | Meaning | Response |
|---|---|---|
| ValidationException | Malformed request | Fix the request |
| ThrottlingException | Rate or quota exceeded | Backoff, quota increase |
| AccessDeniedException | Missing permission | Fix IAM |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Request a higher service quotaWrong
Quotas address throttling, not malformed requests.
B. Add retries with exponential backoffWrongMost tempting
Retrying a malformed request fails the same way every time.
Why it tempts: Backoff is the right answer for many Bedrock errors, so it is a reflex. But retrying a malformed request fails the same way every time.
C. Switch to another AWS RegionWrong
The request would be just as invalid in another Region.
D. Check the request against the API specification: model ID, parameter names and body format, using error logsRight
Validation errors mean a bad request: compare it with the API specification.
In practice
- Log the request shape on errors, with sensitive data removed.
- Add contract tests for request bodies to the CI pipeline.
Use case
An illustrative scenario, not a real incident.
A team finds a renamed parameter in the new code, fixes it, and the errors stop.
See how it works
flowchart TD
E{"Which error?"} -->|"ValidationException"| V["Fix the request format"]
E -->|"ThrottlingException"| T["Back off, review quotas"]
E -->|"AccessDeniedException"| A["Fix IAM permissions"]How to read this chart
- At "Which error?": if "ValidationException", go to "Fix the request format"; if "ThrottlingException", go to "Back off, review quotas"; if "AccessDeniedException", go to "Fix IAM permissions".