AI and Coding Agents (in Cloud Environments)
AI and coding agents are applications built on large language models that call tools and APIs to carry out multi-step tasks, including creating or changing cloud resources, which makes the permissions they hold a cloud security concern.
What are AI and coding agents in cloud environments?
AI and coding agents are artificial intelligence-driven systems designed to autonomously or semi-autonomously perform tasks, generate code, execute commands, interact with APIs and manage infrastructure.
Within cloud environments, these agents can perform various operational activities, including:
- Provisioning and configuring cloud resources
- Generating Infrastructure as Code (IaC)
- Executing CLI commands and automation scripts
- Managing identity and access permissions
- Performing security remediation
- Troubleshooting infrastructure and applications
- Executing software deployment workflows
Unlike traditional automation, AI agents can dynamically determine which actions to perform based on instructions, objectives and environmental context.
Why AI agents change cloud security risk
AI agents introduce additional complexity to cloud security by increasing the speed, scale and autonomy of infrastructure changes.
Potential security risks include:
- Excessive agency and autonomy
- Overprivileged non-human identities
- Unauthorized infrastructure changes
- AI-generated cloud misconfigurations
- Insecure identity and trust relationships
- Unintended resource exposures
- Configuration and policy drift
- Bypassing established security workflows
The OWASP Top 10 for Large Language Model Applications identifies Excessive Agency as a security risk associated with granting AI systems excessive functionality, permissions or autonomy.
How to secure AI agents in cloud environments
Organizations can reduce the risks associated with AI-driven cloud operations through several security practices:
- Enforcing least-privilege permissions
- Assigning dedicated, narrowly scoped identities
- Restricting access to tools and APIs
- Establishing human approval for sensitive operations
- Maintaining comprehensive audit trails
- Implementing preventive cloud security guardrails
- Enforcing security policies independently of the agent
Instructions and prompts alone should not be treated as enforceable security boundaries.
Native cloud security mechanisms, including AWS SCPs and RCPs, Azure Policy and Google Cloud Organization Policy, can provide independent security boundaries for supported cloud operations.
AI agents and source-agnostic risk
AI agents represent another source of cloud infrastructure changes, alongside IaC, CI/CD pipelines, ClickOps, CLI commands, API requests and traditional automation.
Preventive cloud security addresses source-agnostic risk by enforcing security intent at the point of deployment, regardless of whether an applicable operation originates from a human, an automated workflow or an autonomous AI agent. This enables organizations to adopt AI-driven automation while maintaining consistent security boundaries without modifying existing production resources.
Why it matters
AI agents can introduce cloud security risks at machine speed, potentially creating or replicating insecure configurations faster than traditional detection and remediation processes can respond.
As organizations increasingly adopt autonomous systems, security controls must operate independently of the entities initiating cloud changes. The objective is not to restrict AI innovation, but to ensure that autonomous operations remain within established organizational security boundaries.