MLA-C02 practice question: IAM and least privilege for ML (2 of 2)
Operating, Monitoring, and Securing ML and AI Solutions A free question from our original MLA-C02 practice exam. Try it, then open the answer to see why each option is right or wrong.
A pet insurer has an application that calls Amazon Bedrock to summarize claim notes. The security team approved one foundation model in one Region for this use. The application's IAM role currently allows model invocation for every model in every Region, and an audit found it could call a model the team never approved.
The team wants the role to invoke only the approved model, and it wants the change limited to the role's policy without changing the application code.
Which change best meets these requirements?
Choose one answer.
AA. Keep the broad policy, and add a deny statement for the one model in the role's trust policy, since trust policies control what actions the role can take.
BB. Replace the wildcard resource in the invoke permission with the ARN of the approved model in its Region, so the role can invoke only that model.
CC. Create a new IAM user for the application with the same wildcard policy, and rotate its access keys every week.
DD. Add a network rule that blocks outbound traffic from the application to Bedrock endpoints in all other Regions.
Show the answer and explanation
Answer: B
A. Wrong: A trust policy controls who can assume the role, not which actions it can perform. The deny belongs in the permissions policy and is in the wrong place here.
C. Wrong: Rotating keys does not limit which models the identity can invoke, so the audit finding remains. The option does not address the permission scope.
D. Wrong: A network rule could limit Regions, but it does not restrict the model, and the stem asks for a change to the role's policy. It also does not match the audit finding about which model was called.
Explanation
Bedrock invoke permissions accept model resource ARNs, so the role's wildcard can be replaced with the approved model in the approved Region. Trust policies control who assumes the role, and key rotation or network rules do not restrict which model the role can call.
Want more on IAM and least privilege for ML? The 5 full-length practice sets have 10 more IAM and least privilege for ML questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →