Odile Gate on AWS: put a gate in front of API Gateway, Lambda, ALB and Bedrock agent tools
Point your agent at Gate and configure your AWS-hosted HTTPS API as the project's upstream.
1. What Gate checks before calling your API
Create a project with your API's base URL, then register each app with its own Gate key, allowed method-and-path rules and per-minute call limit. The app sends Authorization: Bearer <app key> to https://gate.odilelabs.com/g/<project id>/....
For per-user rules such as GET /users/{user}/orders/:id, configure user_tokens with your login provider's JWKS URL and issuer, and send the signed-in user's JWT in x-odile-user-token. Keep observe_only: false to enforce the user check and loop stop; observation mode logs those checks without stopping the call.
The loop breaker stops repeated identical calls with 429 loop_detected before forwarding them. For approval-required actions, grant a run with an active human approver: Gate holds the call with 202 approval_required, and the agent must resend the exact approved call with x-odile-action.
The audit log records call metadata and outcomes, with a CSV export; metrics summarize the last 24 hours of stored calls by status and reason, duration including upstream wait, and separate monthly usage. Coverage can be partial: invalid keys have a logging cap, and local audit storage can be disabled when SIEM streaming is configured.
Gate removes the incoming Authorization header and x-odile-user-token before forwarding, so the backend does not receive the app key or user JWT in those headers. It decrypts the project's stored header_value and sets header_name to that value verbatim, replacing any caller-supplied value for that header. If you omit the name, it uses Authorization; include Bearer in the stored value yourself when your backend expects it, or use a header such as x-api-key.
2. Where to put Gate
Use a public HTTPS hostname on port 443 or 8443 for the upstream; Gate refuses IP literals and private host names. Choose the AWS endpoint that exposes your API, and require its backend or authorizer to accept only Gate's upstream secret so callers cannot bypass Gate by using the direct URL.
- API Gateway REST API: if your API uses an API key, configure Gate's
header_nameasx-api-keyand itsheader_valueas that key; retain your backend's authorization checks. - API Gateway REST or HTTP API: use a Lambda authorizer that validates the configured upstream secret header.
- Application Load Balancer (ALB), Lambda function URL, ECS or EKS service: expose a public HTTPS endpoint whose application validates the same secret header.
Keep the API's own ownership checks as well as Gate's route rules.
3. The SigV4 limit
The gateway proxy swaps a bearer or other header secret; it does not sign upstream requests with AWS IAM credentials using Signature Version 4 (SigV4). An endpoint requiring SigV4, such as IAM-authenticated API Gateway or direct S3 or DynamoDB access, cannot be used directly as this upstream. Put a Lambda-backed API or API Gateway endpoint that validates Gate's secret in front of it, and perform the IAM-authenticated call on your AWS side. Gate's AWS signer is used for Marketplace registration and entitlement calls.
4. Bedrock agents and other tool callers
For a tool caller that can send HTTP requests, point its tool endpoint at https://gate.odilelabs.com/g/<project id>/<tool path> and send its app key as Authorization: Bearer <app key>; if a Bedrock tool uses a Lambda handler, have that handler make this HTTP call. Keep the app key in AWS Secrets Manager or Parameter Store on your side and load it in your caller.
5. Webhook alerts
Configure alerts.webhook_url and alerts.threshold in declarative config, or send webhook_url and threshold to PUT /api/projects/<id>/alerts with your admin key. The threshold defaults to 20 and accepts 5–1,000: it triggers gate.blocked_spike when an app accumulates that many responses with status 401, 403 or 429 in a rolling ten-minute window, including those statuses returned by the upstream; unknown keys are grouped together.
Gate sends a JSON POST to the webhook, optionally signed when webhook signing is configured. The receiver must be a public HTTPS hostname on port 443 or 8443, must not point to Gate itself, and must accept that POST without IAM request signing; an API Gateway endpoint or Lambda function URL configured this way can receive it.
Loop stops emit gate.loop_detected; the anomaly guard emits gate.anomaly after its separate traffic-baseline checks, rather than using the refused-call threshold. Spike and anomaly alerts wait at least an hour after the app's last recorded alert; loop notifications have a separate per-app, ten-minute-bucket limit. The anomaly guard defaults to alert mode; strict mode tightens the loop breaker for 30 minutes, and the anomaly score itself never blocks a call.
6. AWS Marketplace
The free AWS Marketplace product is Odile Gate: API gateway and MCP server for AI agents. AWS buyers arrive at /aws/register with a Marketplace registration token; Gate creates one Free project per AWS account and shows the admin key once. Repeat registration or another agreement for the same account reuses that project without displaying the key again.
The Marketplace project starts with the built-in Demo Desk API; to use your AWS API as upstream, create a separate project with your API's base URL.
Connect your coding agent to Gate's MCP server:
claude mcp add --transport http odile-gate https://gate.odilelabs.com/mcp
7. Plans and setup
- Free: 3 apps, 10,000 calls a month and 30-day audit history; stops at its limits.
- Pro: $29 a month, 25 apps, 1,000,000 included calls a month and 365-day audit history; extra calls cost $10 per million up to the extra-call limit you set.
- Setup: $99 once to put one existing API behind Gate, configure app keys, allowed calls and limits, show it working and send a short guide; works with Free or Pro.
Plans and setup · Open your dashboard
Other guides
Give each agent its own API key · Per-user rules · Audit and metrics · Customer-scoped actions · Exact approvals · Safe retries · Check permissions · Model API keys · OpenShell middleware