Currently, development teams are operating large language model (LLM) inference endpoints, alongside Model Context Protocol (MCP) servers and Agent2Agent (A2A) servers, right next to their established REST APIs. These components can be hosted on platforms such as Amazon Bedrock, Amazon Bedrock AgentCore, and Amazon Elastic Kubernetes Service (Amazon EKS), and furthermore, more enterprises are now treating their APIs as the core product offering. AI agents, in particular, are capable of reading API specifications, selecting necessary tools, and chaining function calls without any human interaction within an application interface. Historically, APIs interacted with two types of consumers: other software services and end-users via an application. A third category has emerged: AI agents acting on behalf of individuals, suggesting a pervasive presence of personal AI agents capable of invoking APIs.
To address this evolving ecosystem, capabilities are being rolled out across AWS WAF, Amazon CloudFront, Application Load Balancer, and Amazon API Gateway to facilitate the discovery and safeguarding of both APIs and the new AI endpoints utilized by services, applications, and automated agents. Specifically, Amazon API Gateway features a new function called API Portal, which inventories your APIs and AI endpoints. AWS WAF now includes API Security, a novel managed rule group designed to shield your APIs, and AI Security, another managed rule group dedicated to protecting your AI endpoints. All these features are available for general use today. Discovery via API Portal can be activated for a solitary account or across an entire organization within AWS Organizations. The two security rule groups operate by securing the resources linked to a designated protection pack (web ACL), and these systems function cohesively: API Portal provides visibility into which discovered endpoints are covered by AWS WAF, while security events flagged by AWS WAF appear on the individual detail page for each managed API.
The nature of the APIs themselves remains unchanged; the transformation lies in how they are exposed, who interacts with them, and what potential threats they face. Regarding exposure, setting up a new MCP server or LLM endpoint takes only a matter of minutes. Such endpoints can be positioned behind a load balancer or a CloudFront distribution without necessarily passing through the API gateway, which means they might not appear in the API registry or undergo standard security vetting. Moreover, an agent capable of reaching these endpoints does not require access to your documentation because the endpoint describes its own capabilities: an MCP client requests its available tools from the server using `tools/list`, and an A2A client reads the agent card published by the server.
The nature of the callers has diversified considerably. The following comparison details the three types of consumers interacting with APIs presently.
| Caller | Normal Operation Appearance | Abuse Appearance | Protection Implication | | :--- | :--- | :--- | :--- | | Service to service | Predictable, authenticated calls repeating a known pattern | A compromised API key, or a partner exceeding their contract scope | Track behavior and rate for each API key and endpoint | | Person to service, via an app | Sessions and calls occurring at a human pace through a user interface | Account takeover or automated checkout processes | Browser-based indicators, such as CAPTCHA and browser fingerprints, are relevant here | | AI agent to service, for a person | Human intent exhibited through machine actions originating from an HTTP client or automated browser | An agent utilizing stolen credentials, or a bot impersonating an agent | Browser signals alone are insufficient, necessitating visibility into the API itself |
The security risks have also evolved. APIs designed for web and mobile applications were originally conceived with a single client: the application itself. This application accesses the APIs in a prescribed sequence, at a human tempo, utilizing input that has already undergone validation. Now, legitimate agents access these identical APIs directly, and unfortunately, malicious actors and fraudsters do the same. None of these interacting parties are bound by the operational rules that the native application adheres to.
These changes are met with a corresponding response, as illustrated in a diagram. In this depiction, services, individuals, and AI agents interact with APIs via their respective ingress points. At these points, API Portal maps the endpoints, and AWS WAF applies API Security and AI Security rules to the same incoming traffic to mitigate dangers. API Portal constructs an inventory of your APIs by analyzing both their configuration and live traffic, discerning which are AI endpoints (LLM inference, MCP, and A2A), and indicating what requires protection. This analysis is performed by examining configuration and traffic across your API entry points: CloudFront, Application Load Balancer, and API Gateway. API Security guards against three categories of API misuse: broken object level authorization, authentication assaults like credential stuffing and tampered tokens, and reconnaissance activities such as probing for routes not documented. It achieves this using rules that operate on a per-request basis, supplemented by behavioral detections that learn from your traffic patterns. AI Security identifies traffic related to AI workloads (LLM inference, MCP, and A2A), verifies MCP and A2A requests against their defined protocol, and scrutinizes prompts and responses using Amazon Bedrock Guardrails to detect harmful content, sensitive data, and prompt attacks. All three security features integrate with Amazon CloudFront, Application Load Balancer, and Amazon API Gateway REST APIs. For the current roster of supported protocols, endpoint types, and resources, reference the AWS WAF Developer Guide sections for API Security and AWS WAF AI Security rule groups. These three functionalities reside in two locations: API Portal is accessible within the Amazon API Gateway console, though its scope extends beyond just API Gateway to encompass CloudFront, Application Load Balancer, and API Gateway. API Security and AI Security are managed within the AWS WAF console.
The necessity of discovery is paramount because an invisible API cannot be secured. While one might inquire of a platform team regarding the total number of APIs they maintain, this figure derived from a registry can be misleading. The actual quantity of endpoints responding to internet requests is dynamic. For instance, an MCP server established for a temporary hackathon may not appear in the registry, nor does an older v1 endpoint that has not been decommissioned. Both continue to receive requests. API Portal generates this inventory by analyzing both the live traffic and the API configuration. Users can enable this discovery feature in API Portal for a single account or across their entire organization within AWS Organizations, allowing for the exclusion of resources that should not be included in the inventory. It achieves this by reviewing the service logs and configuration records associated with your API entry points. This process requires no attachments, no forwarding of logs, and no rerouting of traffic. The tool enumerates endpoints based on their host, path, and HTTP method. Initially, every endpoint exists as a shadow API—it is deployed and accessible, but not yet subject to governance. When it is promoted, it becomes a managed API. For APIs that are under direct management, API Portal also flags zombie APIs, those that have neither traffic nor configuration modifications over a specified duration, and orphaned APIs, whose owning account has been closed or removed from the organization. Remediation involves retiring an unused zombie API or resolving the ownership of an orphaned one. Further details regarding the classification rules can be found in the API Portal Developer Guide. API Portal also maps your AI endpoints, reporting the specific type of each endpoint, such as an A2A server, an MCP server, or an LLM inference endpoint. It locates these within the same traffic flows as traditional APIs at the same entry points (CloudFront, Application Load Balancer, and API Gateway), listing them in the same inventory, thereby preventing the need for a separate view. Collectively, a single entry in the inventory can represent an unmanaged shadow MCP server.
The operational benefit of this visibility is significant; as Mike Hasani, Senior Software Engineer at Principal Financial Group, stated, "We can manage our API environment more effectively when we have a clear picture of what’s running across AWS. API Portal gives us that visibility without requiring teams to change how they deploy APIs or route traffic, helping us create a more complete view across the enterprise."
Protecting an API often requires two distinct methods of detection because some vulnerabilities manifest within a single request, while others only become apparent over an extended period. One example involves a request such as `GET /v1/orders/48213 HTTP/1.1 Host: orders.example.com Authorization: Bearer eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiJhZG1pbiIsInJvbGUiOiJhZG1pbiJ9`. This JSON Web Token (JWT) specifies `alg: none`, instructing the API to bypass signature verification, which a correctly constructed client would not send. The API Security managed rule group intercepts this request before it reaches the origin, requiring no learning period for this detection. These same rules also detect other forms of token manipulation, such as directing the token toward a signing key controlled by the attacker. These rules examine the structure of the token within the Authorization header; they do not validate the signature, meaning the application must still perform the final token validation. For a complete listing of rules and their default functions, consult the AWS WAF Developer Guide for the API Security managed rule group.
The second type of threat involves requests like `GET /accounts/1337 HTTP/1.1`. This particular request appears benign, and the caller’s token is valid. However, it constitutes abuse if the caller does not possess authorization for account 1337, a detail that no single request can reveal. This scenario is known as broken object level authorization (BOLA), which is cataloged as the first item in the OWASP API Security Top 10. Consequently, the managed rule group employs a learning function. It establishes a baseline using legitimate traffic and then flags callers that deviate from this norm. This process requires no
Why it matters
The integration of AI endpoints alongside traditional REST APIs creates a significantly expanded and complex attack surface for operators. These new tools provide necessary visibility and defense against threats targeting both standard APIs and emerging AI interactions.






