- Newest
- Most votes
- Most comments
When creating a custom service role for Amazon Bedrock features like Knowledge Base or Agents, you won't find "Bedrock" directly listed in the service selection dropdown in the IAM console. This isn't an oversight on your part.
The recommended approach for creating a custom service role for Amazon Bedrock is to:
- Create a role by following the steps for delegating permissions to an AWS service
- Attach a trust policy that specifically allows the Bedrock service to assume the role
- Attach the relevant identity-based permissions needed for your specific Bedrock feature
Your current workaround of creating a role for a different service and then editing the JSON trust policy to delegate to Bedrock is actually the correct approach. The trust policy should include the Bedrock service principal (bedrock.amazonaws.com).
For example, when creating a service role for Bedrock Agents, you would need to attach a trust policy that allows Amazon Bedrock to assume the role and create/manage agents. Similarly, for Bedrock Flows, the trust policy would allow Amazon Bedrock to assume the role and manage flows.
After creating the role with the proper trust relationship, you would then attach the appropriate permissions policies based on the specific Bedrock feature you're using (Agents, Knowledge Bases, Flows, etc.) and your particular use case.
Sources
Service roles - Amazon Bedrock
Create a service role for Amazon Bedrock Agents - Amazon Bedrock
Create a service role for Amazon Bedrock Flows in Amazon Bedrock - Amazon Bedrock
Create a custom service role for batch inference - Amazon Bedrock
