Fixing AccessDenied on Bedrock Automated Model Evaluation Jobs
Short answer
A Attach a trust policy that defines Amazon Bedrock (bedrock.amazonaws.com) as the service principal on the evaluation service role so the job can assume it.
Question
First, the system creates a service role and attaches an IAM permissions policy that allows Amazon Bedrock to invoke the FMs and grants access to Amazon S3. Then the system requests and receives access to all the FMs that need to be tested. Then the system creates S3 buckets to store the evaluation results. Then the system creates evaluation configurations by using the TREX built-in dataset. Finally, the system specifies the Accuracy metric and Generation evaluation type in each evaluation configuration.
When the GenAI developer attempts to run the system, it fails with an AccessDenied exception. The GenAI developer must resolve the issue.
Which solution will meet this requirement?
Key Takeaways
The question tests whether you recognize that an IAM role for a Bedrock automated model evaluation job needs BOTH an identity-based permissions policy and a trust (assume-role) policy — the classic trap is to blame the dataset choice, the metric configuration, or S3 CORS for what is purely an sts:AssumeRole failure.
Amazon Bedrock automated model evaluation jobs require an IAM service role carrying both an inline permissions policy (Bedrock model invocation plus S3 access) and a trust policy that lets the Bedrock evaluation service assume the role. Because the developer created only the permissions half, the job's AssumeRole call is rejected, and the AccessDenied exception is resolved by attaching a trust policy naming bedrock.amazonaws.com as the service principal (option A).
Common mistake: Learners most often pick C or D, reasoning that TREX is incompatible with the Accuracy/Generation pairing and that Gigaword with Summarization/Correctness would validate correctly. A mismatched dataset or metric produces a validation or evaluation-configuration error, not an AccessDenied exception raised before the job can even assume its role. Option B is also a common wrong pick because S3 appears in the permissions policy, but CORS governs browser-based requests, not IAM authorization.
Expert Analysis
Why the Answer Is Correct
An IAM role is defined by two separate policy documents: the permissions (identity-based) policy and the trust policy returned by the same CreateRole call. The developer explicitly attached the permissions policy allowing Bedrock to invoke the FMs and to reach S3, but the narrative never mentions defining who may assume the role. When the automated model evaluation job starts, the Bedrock service calls sts:AssumeRole on the service role; without a trust relationship permitting the bedrock.amazonaws.com service principal, that call is denied and surfaces as an AccessDenied exception. Option A supplies exactly the missing half — a trust policy that defines Amazon Bedrock as the service principal — which is the documented requirement for model evaluation jobs, RAG flows, and any other Bedrock feature that runs under a customer-supplied service role.
Why the Other Options Are Wrong
Option B addresses CORS, which is a browser-side HTTP header mechanism controlling whether web origins may read S3 responses; it has no bearing on server-side IAM authorization for a job that reads and writes buckets through the AWS SDK, and it would never generate an AccessDenied from role assumption. Option C swaps the built-in TREX dataset for Gigaword, but both are supported AWS-managed evaluation datasets; a dataset problem would raise an invalid-argument or validation error and would not prevent the role from being assumed at the start of the job. Option D changes the evaluation type to Summarization with a Correctness metric, which is a legitimate configuration for summarization workloads, yet configuration changes cannot fix a permissions failure that occurs before any FM is invoked. Both C and D also distract from the stated goal of comparing general text generation accuracy, which the Accuracy/Generation pairing already expresses correctly.
Community Comment Notes
The single community comment reaches the same conclusion, explaining that an identity-based service role for Bedrock automated model evaluation "requires two types of policies" — a permissions policy, which the developer "already attached," and a trust policy defining "who is allowed to assume" the role. That reasoning matches AWS's documented model evaluation job setup, where the execution role must trust bedrock.amazonaws.com so the service can invoke models and write results to S3 on the customer's behalf.
Official Reference
- https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation.html
- https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html
These links open the official vendor documentation in a new tab.
Exam Strategy
In Bedrock scenario questions, an AccessDenied or role-assumption failure almost always points to the trust policy rather than to models, datasets, metrics, or S3 CORS. Verify first that the service role trusts the correct service principal (here bedrock.amazonaws.com), then check the permissions policy for the specific actions involved.
Frequently Asked Questions
Why doesn't changing the TREX dataset or the Accuracy metric fix an AccessDenied exception?
How is CORS different from the IAM permissions policy on the S3 buckets?
Discussion 1 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 1
-
TNT87 👍 1 Answered AWhen you create an AWS identity-based service role for Amazon Bedrock to perform automated model evaluation jobs, it requires two types of policies: 1. Permissions Policy: This grants the role permission to access specific AWS resources (like Amazon S3 and Bedrock foundation models). The developer already attached this. 2. Trust Policy (Assume Role Policy): This defines who is allowed to assume the role. Without a trust policy explicitly listing ://amazonaws.com as a trusted service principal, Amazon Bedrock is blocked from assuming the role to run the evaluation job, resulting in an AccessDenied exception
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All AIP-C01 Questions
Access 110 questions with complete answers and detailed explanations.
View Full AIP-C01 Practice Test →