- Newest
- Most votes
- Most comments
I was able to replicate the error message in my environment as well using the permissions that you provided for the Bedrock agentResourceRoleArn. For replication, I used the inference profile for Claude 3.5 Haiku.
In order to solve this issue, you will have to add the following permission to the IAM role policy.
{
"Action": [
"bedrock:GetInferenceProfile",
"bedrock:ListInferenceProfiles",
"bedrock:UseInferenceProfile"
],
"Resource": "arn:aws:bedrock:us-east-1:<account-id>:inference-profile/*",
"Effect": "Allow"
}
I added the following policyStatement to the Agent Role policy and then the Bedrock agent was created successfully.
new iam.PolicyStatement({
effect: iam.Effect.ALLOW,
actions: [
"bedrock:GetInferenceProfile",
"bedrock:ListInferenceProfiles",
"bedrock:UseInferenceProfile"
],
resources: [
`arn:aws:bedrock:us-east-1:${this.account}:inference-profile/*`,
]
}),
For more detail on the IAM permissions required to use inference profiles refer to the document https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-prereq.html
Requesting you to please try out the same in your environment and if issues persists, please reach out to us using AWS Support portal as further troubleshooting would require checking your stack details and other resource's specification.
Relevant content
- asked 13 days ago
