Subchapter 93.1
references/aggregating-resources-into-protection-groups.mdMarkdown12 KBView on GitHub
Domain expertise for grouping AWS Shield Advanced protected resources so Shield treats them as one unit for detection. Covers when a group helps (noisy per-resource detection, resources that share traffic patterns), the aggregation choice (sum, mean, max), the membership pattern (all, by resource type, or an explicit list), and the boundary that protection groups are detection-only and do not apply shared mitigation.
Does not cover subscribing and protecting resources, automatic mitigation, health-based detection, SRT setup, or event review; those are separate references.
Execute commands using the AWS MCP server when connected (sandboxed execution, audit logging,
observability). Fall back to the AWS CLI otherwise. Shield Advanced control-plane calls run in
us-east-1; pass --region us-east-1 on every command.
To aggregate resources into a protection group end to end, follow the procedure exactly. See the Procedure section below.
The procedure covers:
When advising on protection groups, you MUST state ALL of the following points together, not a subset:
The sections below give the detail behind each point.
| Aggregation | Behavior | Use when |
|---|---|---|
| Sum | Combines traffic across all members | Many small-traffic resources, or a new resource that needs to inherit an existing baseline; reduces false positives |
| Mean | Averages traffic across members | Members with uniform traffic, such as a fleet of load balancers |
| Max | Tracks the highest single-member traffic | Multi-tier applications where one tier carries most of the traffic (for example CloudFront in front of an Application Load Balancer in front of EC2) |
Constraints:
| Pattern | Behavior |
|---|---|
| All | All protected resources regardless of type |
| By resource type | All protected resources of a specified resource type |
| Arbitrary | A manually specified list of resource ARNs |
Constraints:
A protection group changes detection across its members; it does not apply mitigation as a group. Customers expect a group to mitigate the whole set and are surprised when it does not.
Constraints:
The pattern only matches resources that are already individually protected. Protect the resources first, then they fall into the group (Procedure, Step 1).
Protection groups are detection-only. Mitigation still applies per resource (Protection groups are detection-only).
The aggregation does not match the topology. Reconsider sum vs mean vs max (Decision: aggregation).
Protection groups change detection across protected resources, so call out the risks and the controls that contain them.
ShieldMitigationRuleGroup rule group. Warn against removing that
rule group from a web ACL during cleanup, since its removal turns off automatic mitigation for
every resource using that web ACL with no obvious signal.shield:ListProtections, shield:CreateProtectionGroup,
shield:ListProtectionGroups) rather than broad Shield or administrator access.shield:* calls so every protection-group
configuration change leaves a record, and confirm the CloudTrail trail uses SSE-KMS encryption on
its S3 log bucket and CloudWatch Logs log group, since CloudTrail records contain sensitive API
metadata (caller identities, resource ARNs, parameters).This procedure creates a protection group over resources that are already individually protected, with the chosen aggregation and membership pattern, then surfaces the console link to verify.
SUM, MEAN, or MAX.ALL, BY_RESOURCE_TYPE, or ARBITRARY.BY_RESOURCE_TYPE): The resource type to group.
ALL does not take a resource type.ARBITRARY): The list of resource ARNs to include.Constraints for parameter acquisition:
Constraints:
You MUST confirm credentials with aws sts get-caller-identity
You SHOULD use temporary credentials from an assumed IAM role (for example via IAM Identity Center or an instance profile) rather than long-lived IAM user access keys for these security-sensitive Shield Advanced operations
You SHOULD scope the caller’s IAM permissions to the minimum this procedure needs
(shield:ListProtections, shield:CreateProtectionGroup, shield:ListProtectionGroups) rather
than broad Shield or administrator access
You SHOULD confirm AWS CloudTrail is enabled and logging shield:* calls so every Shield Advanced
configuration change leaves an audit trail
You SHOULD confirm the CloudTrail trail is configured with SSE-KMS encryption on its S3 log bucket and CloudWatch Logs log group, since CloudTrail records contain sensitive API metadata (caller identities, resource ARNs, parameters)
You MUST confirm the member resources are already protected:
aws shield list-protections --region us-east-1Constraints:
You MUST create the group with the chosen aggregation and pattern. For an ALL pattern (every
protected resource regardless of type), do not pass --resource-type:
aws shield create-protection-group --protection-group-id {protection_group_id} \
--aggregation {aggregation} --pattern ALL --region us-east-1For a BY_RESOURCE_TYPE pattern, you MUST pass the resource type:
aws shield create-protection-group --protection-group-id {protection_group_id} \
--aggregation {aggregation} --pattern BY_RESOURCE_TYPE --resource-type {resource_type} --region us-east-1For an ARBITRARY pattern, you MUST pass the member ARNs instead of a resource type:
aws shield create-protection-group --protection-group-id {protection_group_id} \
--aggregation {aggregation} --pattern ARBITRARY --members '["{member_arn}"]' --region us-east-1Constraints:
You MUST confirm the group was created:
aws shield list-protection-groups --region us-east-1You MUST present the Shield protected-resources console link and tell the customer to open it and confirm the protection group and its members:
https://us-east-1.console.aws.amazon.com/wafv2/shieldv2#/protections{
"protection_group_id": "edge-and-origin",
"aggregation": "MAX",
"pattern": "ARBITRARY",
"members": [
"arn:aws:cloudfront::111122223333:distribution/EDFDVBD6EXAMPLE",
"arn:aws:elasticloadbalancing:us-east-1:111122223333:loadbalancer/app/origin-alb/abc"
]
}Confirmed both members are individually protected.
Created protection group edge-and-origin with MAX aggregation over the distribution and origin ALB.
Note: this groups detection only — automatic mitigation still applies per resource.
Open the Shield console and confirm the protection group:
https://us-east-1.console.aws.amazon.com/wafv2/shieldv2#/protections{
"protection_group_id": "all-albs",
"aggregation": "MEAN",
"pattern": "BY_RESOURCE_TYPE",
"resource_type": "APPLICATION_LOAD_BALANCER"
}Confirmed protected Application Load Balancers exist.
Created protection group all-albs with MEAN aggregation over every protected ALB.
Note: this groups detection only — automatic mitigation still applies per resource.
Open the Shield console and confirm the protection group:
https://us-east-1.console.aws.amazon.com/wafv2/shieldv2#/protectionsThe members are not individually protected. Protect them first (Step 1).
Protection groups are detection-only (Protection groups are detection-only).
Reconsider the aggregation against the topology (Decision: aggregation).