Skip to content
AI Agent Access Control

Give each tool function its own least-privilege role instead of the agent's role

Check 19 of 30: Give each tool function its own least-privilege role instead of the agent's role. A tool that runs with the agent's full role can do everything the agent can, even if the tool needs one action. A narrow role per tool limits damage when one tool is abused or buggy.

The whole checklist ยท The map

Why it matters

A tool that runs with the agent's full role can do everything the agent can, even if the tool needs one action. A narrow role per tool limits damage when one tool is abused or buggy.

How, in each cloud

AWS
Action group Lambda functions run under their own execution role, and Bedrock reaches them through a resource-based policy.
Google Cloud
Create dedicated service accounts for each application, so each tool service can have its own account.
Azure
Use user-assigned managed identities per workload and control which identities are available to the container app.

What the documentation says

  • "Lambda automatically assumes your execution role when you invoke your function." (source)
  • "For your agent to use a Lambda function, you must attach a resource-based policy to the function to provide permissions for the agent." (source)
  • "Create dedicated service accounts for each application, and avoid using" (source)
  • "you can control which managed identities are available to your container app during the init and main phases" (source)

Sources

  1. docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html, read 10 Nov 2026
  2. docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html, read 10 Nov 2026
  3. cloud.google.com/iam/docs/best-practices-service-accounts, read 10 Nov 2026
  4. learn.microsoft.com/en-us/azure/container-apps/managed-identity, read 10 Nov 2026

Last reviewed 16 Nov 2026.