A self-hosted agent on Lambda or EKS has exactly the IAM role you give it
Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.
A Lambda function runs as its execution role. When you create a function in the Lambda console, AWS documents that it creates an execution role with minimal permissions (basic logging to CloudWatch Logs). AWS documents attaching a Lambda function to a VPC: private subnets for private resources, and a public subnet does not give a function internet access.
A Lambda function runs as its execution role. On EKS, Pod Identity associates an IAM role with a Kubernetes service account in a namespace, and IRSA is the older OIDC-based option. AWS documents that the Lambda console creates an execution role with minimal permissions, basic logging to CloudWatch Logs. Every tool the code calls runs as that same role unless the code assumes another role.
On EKS, if access to the instance metadata service is not restricted, a pod's containers can also reach the node IAM role. SCPs and permissions boundaries cap the role. CloudTrail records Lambda API calls with identity information, and by default does not log most data events. Network controls for pods in EKS: none found on 2026-11-10 in the pages read. So is propagation of an end user's permissions to the workload.
- Status
- Self-hosted pattern, not a managed agent service. The entry describes AWS's documented identity, network and logging pieces for the compute the agent code runs on.
- The identity it runs as
- A Lambda function runs as its execution role. On EKS, EKS Pod Identity associates an IAM role with a Kubernetes service account in a namespace; IAM roles for service accounts (IRSA) is the older OIDC-based option. (source)
- What it gets by default
- When you create a function in the Lambda console, AWS documents that it creates an execution role with minimal permissions (basic logging to CloudWatch Logs). On EKS, if IMDS access is not restricted, a pod's containers can also reach the node IAM role. (source)
- Tools and actions
- The agent code calls AWS APIs through an SDK, signing requests with the role's temporary credentials; every tool the code calls runs as that same role unless the code assumes another role. (source)
- The agent's permissions or the user's
- The workload uses its own role credentials. Propagation of an end user's permissions to the workload: none found on 2026-11-10 in the Lambda and EKS pages read. (source)
- Network reachability
- AWS documents attaching a Lambda function to a VPC: private subnets for private resources, and a public subnet does not give a function internet access. Network controls for pods in EKS: none found on 2026-11-10 in the pages read. (source)
- What is logged
- CloudTrail records Lambda API calls with identity information on who made each request. By default CloudTrail does not log most data events. For EKS, control plane logging can send audit logs to CloudWatch Logs. (source)
Boundaries that apply
- IAM policy on the execution role or pod role. The role's permissions policy is the main limit on what the agent can do in the account. (source)
- Pod Identity trust policy conditions. Session tags let the trust policy restrict which service accounts, namespaces and clusters can use the role. (source)
- SCPs and permissions boundaries. AWS documents both as maximum-permission controls that apply to IAM entities. (source)
- IMDS restriction. With IMDS access restricted, a pod's containers can retrieve credentials only for the role tied to their service account. (source)
Checks to run for AWS
- Give each agent its own role or service account, not a shared one: Use one Lambda execution role per function, or one EKS Pod Identity association per service account, so each agent maps to its own IAM role.
- Use short-lived role credentials and no long-lived access keys for the agent: Have the workload use temporary credentials through an IAM role rather than IAM user access keys.
- Limit who can pass, attach or impersonate the agent's role: Grant iam:PassRole only for the specific roles a principal needs to pass to a service.
- Scope the role's trust to the specific agent, service account or workload: Use trust policy conditions (for Pod Identity, session tags for service account, namespace and cluster; for services, aws:SourceArn and aws:SourceAccount).
- Do not run the agent as a default or pre-granted account: 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).
- Write the agent's permission policy from what its tools actually call: Start from the documented minimum policy and narrow it; AWS says to use broad deployment permissions only for development and testing.
- Set an organization-level ceiling the agent's role cannot exceed: Apply SCPs, which specify the maximum available permissions for IAM roles in the organization, and permissions boundaries on the agent's role.
- Explicitly deny the agent IAM changes and destructive actions: Use an SCP or permissions boundary whose maximum excludes IAM write actions and destructive calls on protected resources.
Where Act is behind
Act draws the boundary at the access layer (cloud IAM and network controls, and the gateways or MCP servers in front of agents); it does not inspect prompts or model outputs, which needs a different tool. Your team applies the boundaries it proposes, and its customer evidence for AI boundaries is less mature than for its core access control.
Related pages
Sources
- docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html, read 10 Nov 2026
- docs.aws.amazon.com/eks/latest/userguide/pod-identities.html, read 10 Nov 2026
- docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html, read 10 Nov 2026
- docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html, read 10 Nov 2026
- docs.aws.amazon.com/lambda/latest/dg/logging-using-cloudtrail.html, read 10 Nov 2026
- docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html, read 10 Nov 2026
- docs.aws.amazon.com/eks/latest/userguide/pod-id-role.html, read 10 Nov 2026
- docs.aws.amazon.com/lambda/latest/dg/security-iam.html, read 10 Nov 2026
Last reviewed 16 Nov 2026.