Skip to content

WAF Regional

CloudMock emulates AWS WAF Regional (v1), supporting Web ACLs, rules, IP sets, byte match sets, and resource associations.

OperationStatusNotes
CreateWebACLSupportedCreates a Web ACL
GetWebACLSupportedReturns Web ACL details
ListWebACLsSupportedLists Web ACLs
UpdateWebACLSupportedUpdates a Web ACL
DeleteWebACLSupportedDeletes a Web ACL
CreateRuleSupportedCreates a rule
GetRuleSupportedReturns rule details
ListRulesSupportedLists rules
UpdateRuleSupportedUpdates a rule
DeleteRuleSupportedDeletes a rule
CreateIPSetSupportedCreates an IP set
GetIPSetSupportedReturns IP set details
ListIPSetsSupportedLists IP sets
UpdateIPSetSupportedUpdates an IP set
DeleteIPSetSupportedDeletes an IP set
CreateByteMatchSetSupportedCreates a byte match set
GetByteMatchSetSupportedReturns byte match set details
ListByteMatchSetsSupportedLists byte match sets
DeleteByteMatchSetSupportedDeletes a byte match set
AssociateWebACLSupportedAssociates a Web ACL with a resource
DisassociateWebACLSupportedDisassociates a Web ACL
GetWebACLForResourceSupportedReturns the Web ACL for a resource
import { WAFRegionalClient, CreateWebACLCommand } from '@aws-sdk/client-waf-regional';
const client = new WAFRegionalClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
const { WebACL } = await client.send(new CreateWebACLCommand({
Name: 'my-web-acl',
MetricName: 'myWebAcl',
DefaultAction: { Type: 'ALLOW' },
ChangeToken: 'change-token',
}));
console.log(WebACL.WebACLId);
import boto3
client = boto3.client('waf-regional',
endpoint_url='http://localhost:4566',
region_name='us-east-1',
aws_access_key_id='test',
aws_secret_access_key='test')
response = client.create_web_acl(
Name='my-web-acl',
MetricName='myWebAcl',
DefaultAction={'Type': 'ALLOW'},
ChangeToken='change-token')
print(response['WebACL']['WebACLId'])
cloudmock.yml
services:
wafregional:
enabled: true
  • Rules do not evaluate actual HTTP requests
  • Change tokens are accepted but not validated
  • Consider using WAFv2 for new projects