Do not run the agent as a default or pre-granted account
Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.
Check 5 of 30: Do not run the agent as a default or pre-granted account. Default accounts are created for convenience and can carry broad roles that nobody chose for the agent. An agent that inherits one gets access no one reviewed.
The whole checklist ยท The map
Why it matters
Default accounts are created for convenience and can carry broad roles that nobody chose for the agent. An agent that inherits one gets access no one reviewed.
How, in each cloud
- AWS
- Replace the console-created default role with a role you wrote; AWS documents the Lambda console default as an execution role with minimal permissions (basic logging).
- Google Cloud
- Do not rely on the Compute Engine default service account, which can receive the Editor role; enforce the iam.automaticIamGrantsForDefaultServiceAccounts constraint.
- Azure
- none found on 2026-11-10
What the documentation says
- "By default, Lambda creates an execution role with minimal permissions when you create a function in the Lambda" (source)
- "Editor role ( roles/editor ) on the project by default." (source)
- "automatically be granted the Editor role on your" (source)
- Previous: Scope the role's trust to the specific agent, service account or workload
- Next: Write the agent's permission policy from what its tools actually call
Related pages
- Write the agent's permission policy from what its tools actually call: the check, and how in AWS, Google Cloud and Azure
- Set an organization-level ceiling the agent's role cannot exceed: the check, and how in AWS, Google Cloud and Azure
- Explicitly deny the agent IAM changes and destructive actions: the check, and how in AWS, Google Cloud and Azure
Sources
- docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html, read 10 Nov 2026
- cloud.google.com/iam/docs/best-practices-service-accounts, read 10 Nov 2026
- cloud.google.com/run/docs/securing/service-identity, read 10 Nov 2026
Last reviewed 16 Nov 2026.