Rules Prod AI already applies
Every Managed BYOC WAF includes these rules, so you don’t need to add your own versions of them:How your rules are evaluated
AWS WAF evaluates rules in priority order, lowest first. Rules fall into three priority bands:
The Prod AI critical rules always run before yours, so your rule groups can’t block Prod AI upgrades, support access, or JWT validation.
Add rule groups
Your rule groups are attached to the regional and global WAFs. AWS only lets a web ACL use rule groups with the same scope, so create each rule group in both scopes:- Create your rule groups in AWS WAF, in both scopes and regions. See Managing your own rule groups in the AWS documentation.
- Send the rule group ARNs to your Prod AI deployment team, in the order you want them evaluated.
- Prod AI attaches them at the next deployment.
Update your rules
To add, change, or remove rules, edit the rules in the rule groups you’ve already given Prod AI. Because your rule groups are attached by ARN, your changes take effect right away, without a Prod AI deployment or a request to your deployment team.- Update both scopes. Make the same change to the Regional and the CloudFront copies of the rule group.
- Don’t create your own web ACL. AWS allows only one web ACL per resource, so associating your own web ACL with Managed BYOC resources replaces the Prod AI web ACL and removes the Prod AI IP allowlist, rate limit, and AWS Common Rule Set.
- Don’t edit the Prod AI web ACLs directly. Prod AI manages them, and changes made outside a deployment can be overwritten.
Change or remove rule groups
To add a new rule group, remove one, or change their order, send the updated list of ARNs to your deployment team. Changes take effect at the next deployment.Common use cases
Most customers use rule groups to restrict who can reach their instance. The examples below are rules for the AWS WAF console’s rule JSON editor. Replace the IP set ARNs with your own, and create the IP sets in the same scope and region as the rule group.Allow only known IP addresses
Block every request that doesn’t come from an IP address you trust. Write this as a Block rule for traffic outside your IP set, not an Allow rule for traffic inside it. An Allow rule would skip the Prod AI rate limit and AWS Common Rule Set.- Corporate network egress IPs for offices and other locations where builders and app users work.
- VPN egress IPs for remote employees and contractors.
- CI/CD and automation IPs for pipelines and scripts that call the Prod AI APIs, the MCP server, or the CLI.
- Identity provider IPs for SCIM provisioning. See Allow SCIM requests from your identity provider.
Allow SCIM requests from your identity provider
If you use SCIM, your identity provider sends provisioning requests to your instance’s/scim/v2 path from its own servers, not from your network. An IP allowlist blocks them unless you allow your identity provider’s IP ranges.
AWS WAF can’t match requests by source domain, so allow your identity provider by IP range instead, and only for the SCIM path:
Put those ranges in their own IP set and add a SCIM exception to your IP allowlist rule. This version blocks a request unless it comes from your allowed IPs, or it’s a SCIM request from your identity provider: