AWS Builder Center

The New Insider Isn't Human: Securing AI Agents Before They Get Production Access

AI agents are no longer just answering questions. They're accessing databases, calling APIs, managing infrastructure and executing tasks. But are we giving them more trust than they deserve?

Cybersecurity student & Backend Enthusiasts

Introduction: From Chatbots to Digital Employees

A few years ago, artificial intelligence mostly answered questions, generated text and helped developers write code.
Today, AI agents can do considerably more. They can browse websites, read documents, execute commands, interact with APIs, update databases and even manage cloud infrastructure.
Imagine deploying an AI agent to manage your company's support tickets. You give it access to customer records, an internal database and a few APIs. It works perfectly for weeks.
Then, one day, it reads a malicious instruction hidden inside a customer-submitted document.
What happens next?
The agent might interpret that content as an instruction, attempt to access information it shouldn't, or invoke a tool in an unintended way.
The problem isn't necessarily the AI model itself. It's the combination of autonomy, access and trust.
We're entering an era where AI agents need cybersecurity controls just as much as human employees do.

1. Why Is This Becoming a Serious Security Concern?

This isn't just theoretical speculation.
In September 2026, Google Threat Intelligence Group reported observing threat actors using agentic AI workflows to automate malicious operations. One observed campaign moved from compromising a cloud resource to executing an AI-enabled credential-harvesting operation in under six hours.
Gartner also highlighted the rise of "shadow AI" agents in September 2026: AI automations being created and used by employees without sufficient organizational visibility or governance.
And this issue is relevant to India too.
On November 4, 2026, Reuters reported that India's Indian Cybercrime Coordination Centre (I4C) had warned financial institutions about AI-powered attacks targeting vulnerable software, misconfigured infrastructure and payment APIs.
These developments point towards an important change: AI is becoming part of the operational attack surface.

2. Five Security Risks We Shouldn't Ignore

A. Prompt Injection

An AI agent reads an email, website or document containing hidden malicious instructions.
Unlike a conventional application, an LLM may interpret those instructions as relevant context and attempt to follow them.
This becomes particularly dangerous when the agent has access to external tools.

B. Excessive Permissions

Consider an AI agent that only needs to read information from an S3 bucket.
Why should it also have permission to delete objects, modify bucket policies or access unrelated resources?
Giving an agent broad permissions turns a small mistake into a potentially serious incident.

C. Credential Exposure

AI agents often interact with external APIs and cloud services.
Poorly managed API keys, long-lived access credentials and secrets stored in configuration files can become attractive targets.

D. Tool Abuse

An agent might have access to tools for sending emails, running shell commands, modifying databases or deploying applications.
Even when each individual tool is legitimate, an attacker may attempt to manipulate the sequence in which the agent uses them.

E. Shadow AI Agents

Developers and employees can quickly create personal automations using AI frameworks and APIs.
Without an inventory, organizations might not even know which agents have access to internal resources.

3. How Can We Secure AI Agents on AWS?

The answer isn't to stop building AI agents. It's to make sure they operate within controlled boundaries.
Here are some practical security measures.
1. Give Every Agent Its Own Identity
Don't share one powerful IAM role across multiple agents.
Use dedicated identities and narrowly scoped permissions. Prefer temporary credentials over long-lived access keys.
Amazon Bedrock AgentCore Identity is one AWS capability designed to support authentication and credential management for AI agents.
2. Apply the Principle of Least Privilege
An agent should only access resources required for its specific task.
For example:
  • A reporting agent should primarily have read-only database access.
  • A deployment agent should only modify approved resources.
  • A support agent should not have unrestricted access to payment systems.
3. Monitor Agent Activity
Knowing what an agent answered is not enough. We should understand what it actually did.
AWS CloudTrail can record API activity, helping security teams investigate actions performed through IAM identities and roles.
Amazon GuardDuty and AWS Security Hub can also contribute to cloud threat detection and security operations.
4. Require Human Approval for Critical Actions
An AI agent can prepare a deployment, but should it automatically push changes to production?
An agent can calculate a refund, but should it transfer money without approval?
High-impact operations should have explicit authorization and human oversight wherever appropriate.
5. Test Against Prompt Injection
Before deploying an agent, evaluate how it behaves when it encounters malicious instructions in emails, webpages, documents and retrieved data.
Do not rely exclusively on system prompts to enforce security. Enforce restrictions in the tools, identity layer and application backend as well.

4. A Simple Security Checklist for Developers

Before deploying an AI agent, ask:
  • Does the agent have a unique identity?
  • Are its permissions limited to the resources it needs?
  • Are credentials temporary and securely managed?
  • Can untrusted documents influence tool execution?
  • Are important actions logged?
  • Are destructive operations protected by approval?
  • Can the agent's access be revoked quickly?
  • Have prompt-injection scenarios been tested?
If these questions have no clear answers, the agent probably isn't production-ready.

5. My Take: Identity Is the Next Big Security Boundary

We spent years securing users, devices, servers and applications.
Now we also need to secure autonomous software entities that act on behalf of users and organizations.
An AI agent shouldn't automatically become trusted just because it was created by an authorized employee.
Every agent should have an identity, a defined purpose, restricted permissions and an auditable history of actions.
The future of AI isn't just about building smarter agents.
It's about building agents that can be trusted without giving them unlimited trust.
What do you think?
Should AI agents be treated like regular application workloads, or do they deserve an entirely new identity and access-control model?
I'd love to hear how other AWS builders are approaching agent security.



Further Reading

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article