AWS Details Two Secure Ingress Patterns for Bedrock AgentCore Runtime

Summary
AWS outlines API Gateway and AgentCore Gateway architectures for protecting AgentCore Runtime with identity validation, per-hop least privilege, session binding, network and edge controls, Guardrails, rate limiting, and audit logging.
Key points
- Both patterns authenticate requests and preserve the invoking user’s authorization scope through the agent’s execution chain, using short-lived, narrowly scoped credentials.
- The API Gateway pattern uses a Lambda authorizer, a proxy Lambda in a private VPC, a VPC endpoint, and runtime resource policies to restrict access to the controlled network path.
- The AgentCore Gateway pattern uses a JWT authorizer, an interceptor for identity and session binding, policy enforcement, and machine-to-machine token exchange to verify workload origin.
- For long-running or unattended workloads, the AgentCore Gateway pattern can bind verified identity claims into an encrypted, short-lived session context key.
- The guidance recommends AWS WAF protections, rate limiting, prompt and content screening with Guardrails, and structured audit logging with authentication-failure alarms.
- AWS presents the API Gateway pattern for teams with existing API and VPC infrastructure, and the managed AgentCore Gateway pattern for teams prioritizing lower operational overhead or long-running workloads.
- The linked CDK samples are starting points, not production-ready deployments; AWS recommends adapting the controls to organizational requirements before deployment.
Article Details
- Defense Focus
- Secure access to Amazon Bedrock AgentCore Runtime by binding each request to the invoking user's identity, enforcing least privilege and network controls, screening content, and auditing authorization activity.
- Detection Methods
- Validate JWT signatures, issuer claims, and expiration before processing requests.
- Log authentication outcomes, authorization decisions for tool invocations, and security events as structured JSON.
- Alert on INVALID_JWT events and investigate spikes in authentication failures.
- Monitor request origins and reject runtime requests that do not arrive through the approved network path or workload identity.
- Use IP-based rate limits and per-user request counters to identify and constrain excessive request activity.
- Use CloudWatch Contributor Insights to check whether session-counter writes are evenly distributed.
- Data Sources
- Structured authentication and authorization logs
- Tool invocation decisions and security-event logs
- JWT validation outcomes
- Request source VPC and VPC endpoint values, or gateway workload identity
- IP-based request rates and per-user session-counter activity
- Rule Types
- AWS WAF managed rules: AWSManagedRulesCommonRuleSet, AWSManagedRulesKnownBadInputsRuleSet, and AWSManagedRulesSQLiRuleSet
- AWS WAF per-IP rate-based rules
- Custom request rules for oversized requests and malformed session IDs
- Cedar-based authorization policies
- INVALID_JWT alarm
- Platforms
- Private VPC endpoint ingress pattern
- Managed gateway ingress pattern
- Defensive Actions
- Authenticate every requester at the perimeter and validate tokens before application logic runs.
- Authorize each requested actor, scope, and operation; exchange inbound tokens for short-lived, down-scoped credentials at each hop.
- Preserve verified user identity through the execution chain, using an encrypted, short-lived session context key for unattended workloads.
- Restrict runtime access to a single controlled network path or require the gateway's workload identity; reject direct or unexpected-origin requests.
- Apply edge filtering, bot controls, IP rate limits, and request-size and session-ID validation before requests reach the agent.
- Screen incoming prompts and outgoing tool arguments with guardrails before execution.
- Externalize audit logs and configure alarms for authentication failures.
- Use per-user throttling in addition to IP-level limits where authenticated users could otherwise exhaust agent capacity.
Vendors
Products
Amazon API GatewayWe expose AgentCore Runtime through Amazon API Gateway, which acts as a dedicated ingress point that terminates each client connection.Amazon Bedrock AgentCore GatewayWith Pattern B, you expose AgentCore Runtime through Amazon Bedrock AgentCore Gateway, a managed service purpose-built for agentic traffic that combines ingress authentication, token exchange and Runtime routing withoutAmazon Bedrock AgentCore IdentityTo govern access control across these environments, Amazon Bedrock AgentCore Identity provisions distinct workload identities to let your agents run.Amazon Bedrock AgentCore RuntimeAmazon Bedrock AgentCore Runtime delivers a secure serverless environment to deploy AI agents and tools at scale.Amazon Bedrock GuardrailsAgentCore Runtime provides infrastructure isolation, per session microVMs, per session tool registration, and enforces the application of Amazon Bedrock Guardrails.Amazon CloudWatchYour stack logs and tracks every authorization outcome along this path as structured JSON to Amazon CloudWatch, with an INVALID_JWT alarm.Amazon CognitoBy federating directly with an OpenID Connect identity provider like Amazon Cognito, Okta, or others, the users can only see and interact with agents they’re authorized to use.Amazon DynamoDBTo prevent denial of service attempts, we suggest using Amazon DynamoDB as a lightweight session counter.AWS LambdaA Lambda authorizer: An AWS Lambda authorizer validates the Amazon Cognito-issued JSON Web Token (JWT) by verifying the signature, issuer claim and token expiration, to confirm the requester’s identity.AWS WAFWhile the AWS WAF rate-based rules attached to the API Gateway stage protect against IP-level volumetric abuse, they evaluate requests before authentication.
