AWS Fundamentals Logo
AWS Fundamentals
AWS::WAFv2::RuleGroup

WAFv2 RuleGroup

Contains the Rules that identify the requests that you want to allow, block, or count. In a RuleGroup, you also specify a default action (ALLOW or BLOCK), and the action for each Rule that you add to a RuleGroup, for example, block requests from specified IP addresses or block requests from specified referrers. You also associate the RuleGroup with a CloudFront distribution to identify the requests that you want AWS WAF to filter. If you add more than one Rule to a RuleGroup, a request needs ...

Properties

10 configurable properties. 3 required. Click a row to see details.

Filter:
PropertyTypeFlags
Capacity
integer
Required
Scope
string
RequiredCreate-only
VisibilityConfig
VisibilityConfig
Required
AvailableLabels
Array<LabelSummary>
ConsumedLabels
Array<LabelSummary>
CustomResponseBodies
CustomResponseBodies
Description
string
Name
string
Create-only
Rules
Array<Rule>
Tags
Array<Tag>

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
Arnstring-
Idstring-
LabelNamespacestring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::WAFv2::RuleGroup

Resources:
  MyResource:
    Type: AWS::WAFv2::RuleGroup
    Properties:
      Capacity: 1
      Scope: "value"
      VisibilityConfig: "value"
      Tags:
        - Key: Environment
          Value: Production
      Description: !Ref "AWS::StackName"
      Name: !Ref "AWS::StackName"

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

wafv2:CreateRuleGroupwafv2:GetRuleGroupwafv2:TagResourcewafv2:UntagResourcewafv2:ListTagsForResource

delete

wafv2:DeleteRuleGroupwafv2:GetRuleGroup

read

wafv2:GetRuleGroupwafv2:ListTagsForResource

update

wafv2:TagResourcewafv2:UntagResourcewafv2:UpdateRuleGroupwafv2:GetRuleGroupwafv2:ListTagsForResource

list

wafv2:listRuleGroups

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

ServiceWAFv2
Properties13
Required3
TaggingSupported
Primary IDName

Supported Operations

CreateDeleteReadUpdateList

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

NameScope

External Links