ecr-replication-deployer
Provisions Amazon ECR cross-region and cross-account replication with production defaults: registry-level replication configuration (put-registry-replication-configuration), replication rules (source → destination region and registry), cross-account replication (destination registry ID), pull-through cache rules (upstream registry URL — ecr-public, quay.io, docker.io, k8s.io), cache pull permissions (Lambda/ECS pulls from cached image), replication lag awareness, cost per replicated image (storage in both regions), CloudWatch metrics for replication (ImageReplicationStatus), batch delete protection for replicated images, and deletion policy for source vs replica. Emits a READY_TO_DEPLOY checklist with verification commands. Use when configuring ECR cross-region replication, cross-account ECR replication, ECR pull-through cache, or. Triggers: configure ecr replication, ecr cross-region replication, ecr cross-account replication, ecr pull-through cache, ecr replication rule, ecr registry replication.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-24
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- ecr-replication-deployer
- license
- Apache-2.0
- metadata
- { "tags": "aws, ecr, replication, cloudops, deploy, devtools, provisioning, cross-region, cross-account, pull-through-cache, container-registry", "phase": "1", "author": "Jacky Chan — AWS Community Builder", "domain": "aws-cloudops", "family": "DevTools", "version": "0.1.0", "keywords": "aws, ecr, elastic container registry, replication, cross-region, cross-account, pull-through cache, cloudops, deploy, provisioning, container registry, docker, devtools", "task_type": "deploy", "complexity": "high", "entry_point": "false", "skill_class": "capability", "when_to_use": "Invoke when the user wants to configure ECR cross-region replication, cross-account ECR replication, ECR pull-through cache rules (for docker.io, quay.io, k8s.io, ecr-public upstream registries), multi-region container image availability for DR, or understand replication lag and cost implications. Do NOT invoke for ECR repository lifecycle policies (separate skill), ECR image scanning, or ECS/EKS task deployment.", "dependencies": "aws-orchestrator", "requires_llm": "true", "verdict_shape": "READY_TO_DEPLOY | PREREQUISITES_MISSING", "lifecycle_status": "active", "supports_pipeline": "true" }
- description
- Provisions Amazon ECR cross-region and cross-account replication with production defaults: registry-level replication configuration (put-registry-replication-configuration), replication rules (source → destination region and registry), cross-account replication (destination registry ID), pull-through cache rules (upstream registry URL — ecr-public, quay.io, docker.io, k8s.io), cache pull permissions (Lambda/ECS pulls from cached image), replication lag awareness, cost per replicated image (storage in both regions), CloudWatch metrics for replication (ImageReplicationStatus), batch delete protection for replicated images, and deletion policy for source vs replica. Emits a READY_TO_DEPLOY checklist with verification commands. Use when configuring ECR cross-region replication, cross-account ECR replication, ECR pull-through cache, or. Triggers: configure ecr replication, ecr cross-region replication, ecr cross-account replication, ecr pull-through cache, ecr replication rule, ecr registry replication.
- compatibility
- Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). For live deployment: AWS CLI v2 with ecr access (and cross-account IAM if cross-account replication). Works with Terraform aws_ecr_replication_configuration / aws_ecr_pull_through_cache_rule resources and CloudFormation AWS::ECR::ReplicationConfiguration templates.
02 资源文件 20
- 参考文档eval/test-cases.yaml5.4 KB
- 参考文档evals/baselines/cross-account-replication.md771 B
- 参考文档evals/baselines/cross-region-replication.md838 B
- 参考文档evals/baselines/missing-destination-registry-id.md715 B
- 参考文档evals/baselines/multi-region-dr-with-lifecycle.md951 B
- 参考文档evals/baselines/pull-through-cache-docker-hub.md653 B
- 参考文档evals/eval_config.yaml1.8 KB
- 参考文档evals/evals.json9.7 KB
- 参考文档evals/prompts/cross-account-replication.md488 B
- 参考文档evals/prompts/cross-region-replication.md450 B
- 参考文档evals/prompts/missing-destination-registry-id.md400 B
- 参考文档evals/prompts/multi-region-dr-with-lifecycle.md541 B
- 参考文档evals/prompts/pull-through-cache-docker-hub.md549 B
- 参考文档examples/README.md6.2 KB
- 参考文档references/advanced-patterns.md6.5 KB
- 参考文档references/cross-region-and-cross-account.md10.2 KB
- 参考文档references/diagnostic-commands.md1.6 KB
- 参考文档references/error-handling.md1.1 KB
- 参考文档references/pull-through-cache-and-cost.md9.6 KB
- 参考文档skill.usf.yaml4.5 KB
03 SKILL.md 正文
ECR Replication Deployer
An AWS CloudOps agent skill that provisions Amazon ECR cross-region and cross-account replication with correct defaults. The skill walks the operator through registry-level replication configuration, replication rules (source → destination), cross-account destination registry IDs, pull-through cache rules for external registries (docker.io, quay.io, k8s.io, ecr-public), replication lag awareness, cost per replicated image (storage in both regions), CloudWatch monitoring metrics (ImageReplicationStatus), batch delete protection for replicated images, and deletion policy for source vs replica, captures all configuration decisions, explains why each default matters, and emits a READY_TO_DEPLOY checklist with copy-pasteable verification commands.
Activation keywords
configure ECR replication, ECR cross-region replication, ECR cross- account replication, ECR pull-through cache, ECR replication rule, ECR registry replication, ECR pull-through cache rule.
STRICT output contract
When this skill is invoked with an ECR-replication-provisioning
request (configure cross-region replication, set up cross-account
replication, create a pull-through cache rule, or a partial
configuration), the agent MUST respond with the READY_TO_DEPLOY
checklist defined in the "Output format" section using the literal
all-caps labels ECR_REPLICATION:, VERDICT:, CHECKLIST:, and
VERIFICATION_COMMANDS:. Do NOT preface the checklist with prose,
headings, or disclaimers — emit the block as the first lines of the
response. This contract is what assertion-based evals and downstream
provisioning pipelines rely on; deviating from the literal labels
breaks automation silently.
If any prerequisite is missing, the verdict is PREREQUISITES_MISSING
with a specific gap citation in the checklist (marked [✗]), and
READY_TO_DEPLOY MUST NOT also appear.
Quick navigation
| Section | When to read |
|---|---|
| Prerequisites | Always — verify before provisioning |
| Step 1 — Registry-level replication model | Core model |
| Step 2 — Cross-region replication | Same-account multi-region |
| Step 3 — Cross-account replication | Cross-account sharing |
| Step 4 — Pull-through cache rules | External registry caching |
| Step 5 — Replication lag and timing | Eventual consistency |
| Step 6 — Cost per replicated image | Storage cost awareness |
| Step 7 — CloudWatch metrics | Monitoring |
| Step 8 — Batch delete protection | Replica immutability |
| Step 9 — Deletion policy (source vs replica) | Cleanup |
| Step 10 — Recent features | Latest |
| NEVER do these things | Review before signing off |
| Output format | The literal checklist template |
| references/cross-region-and-cross-account.md | Replication detail |
| references/pull-through-cache-and-cost.md | Cache + cost detail |
Mindset
One-line takeaway: ECR replication is configured at the REGISTRY level — ALL repositories in the source registry replicate to the destination. You cannot replicate individual repositories. Replicated images are READ-ONLY in the destination (you cannot push to a replica). Pull-through cache rules let you cache external images (docker.io, quay.io, k8s.io, ecr-public) locally so that Lambda/ECS pulls from the cached copy without hitting the external registry.
Three misconceptions dominate ECR replication misdesign at provisioning time:
The three provisioning misconceptions moved to references/advanced-patterns.md.
Configuration dependency graph (novel heuristic)
Full dependency table and cross-dependency gotchas moved to references/advanced-patterns.md.
Expert heuristic: replication is registry-level
Registry-level scope tree and key implication moved to references/cross-region-and-cross-account.md.
Expert heuristic: pull-through cache reduces external dependency
Pull-through-cache vs replication tree and key implications moved to references/pull-through-cache-and-cost.md.
Expert heuristic: replicated images are read-only
Replica read-only operations tree and key implication moved to references/advanced-patterns.md.
Prerequisites (verify before provisioning)
Before emitting provisioning commands, verify these prerequisites. If any are missing, the verdict is PREREQUISITES_MISSING.
| Prerequisite | Why it matters | How to verify |
|---|---|---|
| Source ECR registry exists | Replication source must be an existing registry | aws ecr describe-registry |
| Source repositories have images | Replication copies existing and future images | aws ecr describe-repositories |
| Destination region identified (cross-region) | Replication target region | Confirm region name |
| Destination account ID (cross-account) | Cross-account replication needs 12-digit account ID | aws sts get-caller-identity (in destination) |
| Destination registry allows replication (cross-account) | Destination must not have REPLICATION_DISALLOWED | Verify destination registry settings |
| Upstream registry URL valid (pull-through cache) | Must be ecr-public, quay.io, docker.io, or k8s.io | Confirm upstream type |
| IAM permission for ecr:PutReplicationConfiguration | Configuring replication requires this permission | Verify IAM policy |
| Region settings support replication | Some restricted regions may not support ECR replication | Confirm region availability |
If any prerequisite is missing, output VERDICT: PREREQUISITES_MISSING
and cite the specific gap.
Step 1 — Registry-level replication model
ECR replication is configured at the registry level using
put-registry-replication-configuration. This is a single API call
that defines all replication rules for the entire registry.
| Concept | Description |
|---|---|
| Source registry | The registry where images are pushed (primary) |
| Destination | The target region/account where images are replicated |
| Replication rule | A single source → destination mapping |
| Scope | ALL repositories in the source registry (no per-repo filtering) |
| Image state | Replicated images are READ-ONLY in the destination |
# Check current replication configuration
aws ecr describe-registry --region us-east-1
Step 2 — Cross-region replication
Cross-region replication copies images from the source region to one or more destination regions within the SAME account.
aws ecr put-registry-replication-configuration \
--replication-configuration '{
"rules": [
{
"destinations": [
{
"region": "us-west-2",
"registryId": "111122223333"
},
{
"region": "eu-west-1",
"registryId": "111122223333"
}
]
}
]
}' \
--region us-east-1
Key points:
registryIdis the 12-digit AWS account ID (same for cross-region within the same account).- Multiple destinations can be specified in a single rule.
- Once configured, ALL repositories in us-east-1 replicate to both us-west-2 and eu-west-1.
Verify commands (push to source, check replica describe-images): references/diagnostic-commands.md.
Step 3 — Cross-account replication
Cross-account replication copies images from the source account to a
destination account. The destination account ID is specified as the
registryId.
aws ecr put-registry-replication-configuration \
--replication-configuration '{
"rules": [
{
"destinations": [
{
"region": "us-east-1",
"registryId": "999999999999"
}
]
}
]
}' \
--region us-east-1
Critical: the destination account (999999999999) must NOT have replication disabled. By default, registries allow incoming replication. If the destination has set the registry policy to disallow replication, images will not replicate.
Combined cross-region + cross-account configuration example moved to references/cross-region-and-cross-account.md.
Step 4 — Pull-through cache rules
Pull-through cache rules fetch and cache external images in your ECR. When Lambda/ECS pulls an image matching a cache rule, ECR fetches it from the upstream registry and caches it locally.
# Create a pull-through cache rule for docker.io
aws ecr create-pull-through-cache-rule \
--ecr-repository-prefix docker-hub/ \
--upstream-registry-url registry-1.docker.io \
--region us-east-1
# Create a pull-through cache rule for quay.io
aws ecr create-pull-through-cache-rule \
--ecr-repository-prefix quay/ \
--upstream-registry-url quay.io \
--region us-east-1
# Create a pull-through cache rule for k8s.io
aws ecr create-pull-through-cache-rule \
--ecr-repository-prefix k8s/ \
--upstream-registry-url registry.k8s.io \
--region us-east-1
# Create a pull-through cache rule for ecr-public
aws ecr create-pull-through-cache-rule \
--ecr-repository-prefix ecr-public/ \
--upstream-registry-url public.ecr.aws \
--region us-east-1
Supported upstream registries:
| Upstream | URL | ECR prefix example |
|---|---|---|
| Docker Hub | registry-1.docker.io |
docker-hub/ |
| Quay.io | quay.io |
quay/ |
| Kubernetes | registry.k8s.io |
k8s/ |
| ECR Public | public.ecr.aws |
ecr-public/ |
Pulling a cached image:
# Instead of: docker pull nginx:latest
# Use the pull-through cache prefix:
docker pull 111122223333.dkr.ecr.us-east-1.amazonaws.com/docker-hub/library/nginx:latest
Key points:
- The
ecr-repository-prefixmaps to a namespace in your ECR. All pulls via this prefix create repositories under that namespace. - The first pull triggers the cache fetch (slower); subsequent pulls use the cached copy (faster).
- Pull-through cache repositories are managed by ECR — you cannot push to them manually.
Step 5 — Replication lag and timing
Replication is asynchronous. After pushing an image to the source, there is a lag before it appears in the destination.
Replication lag expectations:
├── Same-region cross-account: seconds to ~1 minute
├── Cross-region (same continent): seconds to ~2 minutes
├── Cross-region (intercontinental): 1-5 minutes
└── Large images (>1GB): add transfer time (proportional to size)
CloudWatch ImageReplicationStatus check command moved to references/diagnostic-commands.md.
Important: always verify replication completed before deploying
from a replica. If the image has not replicated yet, pulls will fail
with ImageNotFoundException.
Step 6 — Cost per replicated image
Replicated images incur storage costs in BOTH the source and destination regions. This doubles the storage cost per image.
Cost model:
Source region: ECR storage cost per GB-month
Destination region: ECR storage cost per GB-month (SAME rate)
Total storage cost: 2x normal (source + each destination)
Data transfer:
├── Source → Destination (replication): AWS data transfer rates
└── Destination → Lambda/ECS (pull): standard ECR data transfer (free in-region)
Key implication: replication doubles (or triples for multi- destination) storage costs. For cost optimization:
- Use lifecycle policies to prune old images in BOTH source and destinations.
- Replicate only to regions where you actually deploy.
- Consider pull-through cache instead of replication for third-party images (only one copy cached, not replicated across regions).
Step 7 — CloudWatch metrics for replication
ECR provides CloudWatch metrics for monitoring replication status.
| Metric | Description |
|---|---|
ImageReplicationStatus |
Count of images by replication status (Complete, Failed, InProgress) |
RepositoryCount |
Number of repositories in the registry |
ImageCount |
Number of images across all repositories |
StorageUsed |
Total storage used in bytes |
CloudWatch alarm creation command for replication failures moved to references/diagnostic-commands.md.
Step 8 — Batch delete protection for replicated images
Replicated images CANNOT be batch-deleted in the destination registry. They are read-only. This is a safety mechanism.
# This will FAIL on a replicated image in the destination:
aws ecr batch-delete-image \
--repository-name my-app \
--image-ids imageTag=latest \
--region us-west-2
# Error: ImageNotFoundException or "replicated images cannot be deleted"
To remove a replicated image:
- Delete the image at the SOURCE.
- Manually delete the orphaned replica in the destination (it is now a regular image, not tied to a source image).
Important: deleting the source image does NOT automatically delete the replica. You must clean up the destination manually or use a lifecycle policy in the destination.
Step 9 — Deletion policy (source vs replica)
| Action | Source registry | Destination registry (replica) |
|---|---|---|
| Push image | Allowed | Denied (read-only) |
| Delete image | Allowed (batch-delete-image) | Denied (batch-delete blocked on replicas) |
| Delete repository | Allowed | Allowed (but replicas reappear if source re-pushes) |
| Lifecycle policy | Runs independently | Runs independently (apply to both) |
Recommended deletion workflow:
1. Delete image at source:
aws ecr batch-delete-image --repository-name my-app --image-ids imageTag=v1.0 --region us-east-1
2. Delete orphaned replica in each destination:
aws ecr batch-delete-image --repository-name my-app --image-ids imageTag=v1.0 --region us-west-2
(This works AFTER the source image is deleted — the replica becomes a standalone image)
3. Apply lifecycle policies in BOTH source and destinations for automated cleanup.
Step 10 — Recent features
Recent AWS feature notes (2023-2026) moved to references/advanced-patterns.md.
NEVER do these things
-
NEVER assume replication is per-repository. Replication is at the REGISTRY level. Configuring replication replicates ALL repos. Use cross-account repo policies for selective sharing.
-
NEVER try to push to a replicated image in the destination. Replicated images are READ-ONLY. Push to the source only.
-
NEVER assume deleting the source image deletes the replica. The replica becomes orphaned and must be deleted manually in the destination, or cleaned up via lifecycle policy.
-
NEVER use batch-delete-image on a replicated image in the destination while it is still linked to the source. It will fail. Delete the source image first, then the orphaned replica.
-
NEVER configure pull-through cache with an unsupported upstream URL. Only
registry-1.docker.io,quay.io,registry.k8s.io, andpublic.ecr.awsare supported. Custom URLs are rejected. -
NEVER ignore replication lag before deploying from a replica. Always check
ImageReplicationStatusto confirm the image has replicated. Deploying from a non-replicated image fails withImageNotFoundException. -
NEVER forget that replication doubles storage costs. Each destination region incurs the same storage cost as the source. Apply lifecycle policies in BOTH source and destinations.
-
NEVER configure cross-account replication without verifying the destination allows it. If the destination has
REPLICATION_DISALLOWED, replication silently fails. -
NEVER confuse pull-through cache with replication. Pull- through cache fetches EXTERNAL images into your ECR. Replication copies YOUR images across regions/accounts.
-
NEVER assume replication is instant for large images. Replication lag for multi-GB images can be minutes. Always verify before deploying.
Output format
ECR_REPLICATION: <source-registry-id> (region: <source-region>) → <destinations>
VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING
CHECKLIST:
[✓|✗] Source registry: <registry-id> (region: <source-region>)
[✓|✗] Replication type: Cross-region | Cross-account | Both | Pull-through cache
[✓|✗] Destinations: <region:registry-id list>
[✓|✗] Registry scope: ALL repositories (registry-level — no per-repo filtering)
[✓|✗] Replicated images: READ-ONLY in destination
[✓|✗] Pull-through cache rules: <prefix→upstream list> | none
[✓|✗] Replication lag: expected <X> minutes (verified ImageReplicationStatus)
[✓|✗] Storage cost: <source + destinations> regions (doubles/triples storage)
[✓|✗] Batch delete: BLOCKED on replicas (delete at source first)
[✓|✗] Lifecycle policies: applied in source AND destinations | WARNING (missing in destination)
[✓|✗] CloudWatch monitoring: ImageReplicationStatus alarm configured | not configured
[✓|✗] Tags: <key=value list>
VERIFICATION_COMMANDS:
aws ecr describe-registry --region <source-region>
aws ecr describe-repositories --region <destination-region>
aws cloudwatch get-metric-statistics --namespace AWS/ECR --metric-name ImageReplicationStatus
Worked example — cross-region replication with pull-through cache
ECR_REPLICATION: 111122223333 (region: us-east-1) → us-west-2:111122223333, eu-west-1:111122223333
VERDICT: READY_TO_DEPLOY
CHECKLIST:
[✓] Source registry: 111122223333 (region: us-east-1)
[✓] Replication type: Cross-region (same account)
[✓] Destinations: us-west-2:111122223333, eu-west-1:111122223333
[✓] Registry scope: ALL repositories (registry-level)
[✓] Replicated images: READ-ONLY in destination
[✓] Pull-through cache rules: docker-hub/ → registry-1.docker.io, quay/ → quay.io
[✓] Replication lag: expected 1-2 minutes (verified ImageReplicationStatus)
[✓] Storage cost: 3 regions (source + 2 destinations = 3x storage)
[✓] Batch delete: BLOCKED on replicas (delete at source first)
[✓] Lifecycle policies: applied in source AND destinations
[✓] CloudWatch monitoring: ImageReplicationStatus alarm configured
[✓] Tags: Environment=production, Pattern=multi-region
VERIFICATION_COMMANDS:
aws ecr describe-registry --region us-east-1
aws ecr describe-repositories --region us-west-2
aws cloudwatch get-metric-statistics --namespace AWS/ECR --metric-name ImageReplicationStatus
Error handling
Failure modes and their fixes moved to references/error-handling.md.
References (load on demand)
- references/advanced-patterns.md — mindset misconceptions, configuration dependency graph, read-only replica heuristic, recent AWS features (moved from this file)
- references/cross-region-and-cross-account.md — cross-region/cross-account replication detail, registry-level scope heuristic, combined configuration example (heuristic and example moved from this file)
- references/pull-through-cache-and-cost.md — pull-through cache and cost detail, pull-through-vs-replication heuristic (moved from this file)
- references/diagnostic-commands.md — replication verify/status/alarm commands (moved from this file)
- references/error-handling.md — replication not working, pull-through pull fails, batch delete on replica, storage cost (moved from this file)
Domain
AWS CloudOps / Amazon ECR Cross-Region and Cross-Account Replication & Pull-Through Cache Provisioning.
AWS documentation
- ECR replication — https://docs.aws.amazon.com/AmazonECR/latest/userguide/replication.html
- Cross-region replication — https://docs.aws.amazon.com/AmazonECR/latest/userguide/replication-cross-region.html
- Cross-account replication — https://docs.aws.amazon.com/AmazonECR/latest/userguide/replication-cross-account.html
- Pull-through cache — https://docs.aws.amazon.com/AmazonECR/latest/userguide/pull-through-cache.html
- Pull-through cache rules — https://docs.aws.amazon.com/AmazonECR/latest/userguide/create-pull-through-cache-rule.html
- Registry replication API — https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_PutRegistryReplicationConfiguration.html
- CloudWatch ECR metrics — https://docs.aws.amazon.com/AmazonECR/latest/userguide/cloudwatch-metrics.html
- ECR lifecycle policies — https://docs.aws.amazon.com/AmazonECR/latest/userguide/lifecycle_policy_definitions.html
04 同仓库更多 Skills
xray-tracing-deployer
Deploys AWS X-Ray distributed tracing with production-grade configuration: X-Ray daemon deployment (EC2 systemd, ECS sidecar, EKS DaemonSet, Lambda built-in), SDK instrumentation (Java, Python, Node.js, Go, .NET) with annotations and metadata, sampling rules (default reservoir + rate vs custom rules with URL / method / service-name predicates), service map generation, trace query and retrieval, groups and insights, CloudWatch ServiceLens integration, IAM permissions (PutTraceSegments, GetSamplingRules), and latest features (Lambda Powertools tracing, OpenTelemetry / ADOT Collector support, W3C trace context). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when enabling X-Ray on a new application, adding tracing to ECS / EKS / Lambda, validating a sampling configuration, or generating daemon deployment CLI and IaC templates. Triggers: X-Ray, distributed tracing, X-Ray daemon, sampling rules, service map, X-Ray SDK, OpenTelemetry, ADOT, Lambda Powertools, CloudWatch ServiceLens.
wellarchitected-workload-auditor
Audits AWS Well-Architected Tool workloads for review staleness, per-pillar high-risk issue counts, milestone tracking gaps, and remediation plan completeness. Emits a deterministic verdict (STALE_REVIEW | HIGH_RISK | CONFIG_GAP | OK) per workload with per-pillar risk breakdown, milestone trend analysis, and specific remediation. Use when reviewing Well-Architected workloads, checking WA review freshness, auditing high-risk issues per pillar, validating milestone coverage, or tracking remediation plans.
wellarchitected-review-operator
Operates AWS Well-Architected Tool reviews end-to-end — creates workloads, runs pillar reviews (operational excellence, security, reliability, performance, cost optimization, sustainability, Prosperity), answers questions with risk-tier rationale, generates reports and improvement plans, creates milestones, and integrates with Trusted Advisor and Well-Architected Labs. Runs deterministic pre-checks (workload existence, lens availability, pillar coverage), emits the exact update-answer / get-consolidated-report CLI behind a CONFIRM gate, and verifies risk-tier transitions. Emits READY | BLOCKED | COMPLETED. Use when creating a workload, answering pillar questions, generating an improvement plan, creating a milestone, or integrating with Trusted Advisor. Triggers: well-architected tool, well architected review, workload review, pillar, operational excellence, security, reliability, performance, cost optimization, sustainability, prosperity, improvement plan, milestone, trusted advisor.
wafv2-web-acl-deployer
Provisions AWS WAFv2 Web ACLs with correct production defaults: scope selection (CLOUDFRONT vs REGIONAL), managed rule groups (AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet, WindowsRuleSet, IPReputationList, BotControlRuleSet, AmazonIpReputationList, ATP), custom rules (byte match, IP set, regex pattern, geo match, size constraint, rate-based), rule priority ordering, logging destinations (Kinesis Firehose, CloudWatch Logs, S3), resource association (ALB, API Gateway, CloudFront), rate-based rules with aggregate keys (IP, forwarded IP), Challenge and CAPTCHA actions, and account takeover prevention. Emits a READY_TO_DEPLOY checklist. Use when creating a Web ACL, attaching managed rules, configuring rate limiting, enabling WAF logging, associating a Web ACL with an ALB/API Gateway/CloudFront, or configuring CAPTCHA/Challenge actions. Triggers: create WAF Web ACL, WAFv2, managed rule groups, WAF rate limiting, WAF logging, WAF CAPTCHA, WAF Challenge action, bot control, ATP managed rules.
wafv2-web-acl-auditor
Audits AWS WAFv2 Web ACL configurations to determine whether the ACL provides effective protection: default-action posture (Allow vs Block), managed-rule-group coverage gaps, rule effectiveness (BLOCK vs COUNT, shadow/bypass rules, stale exclusions), rate-based rule correctness, logging and visibility configuration, and text-transformation bypass vectors. Emits a deterministic verdict per Web ACL. Use when reviewing a WAFv2 Web ACL for security posture, checking managed-rule coverage, validating rate-limit configuration, auditing WAF logging, or hardening a WAF before production deployment. Triggers: WAF, WAFv2, Web ACL, managed rule group, AWSManagedRules, rate-based rule, CAPTCHA, Challenge, OverrideAction, Count mode, forwarded IP, Bot Control, ATP, text transformation, WAF logging, WAF visibility, OWASP, SQLi, XSS, RFI.
waf-rule-deployer
Provisions AWS WAFv2 rule sets with production defaults: Web ACL creation (CloudFront scope in us-east-1 vs Regional scope), rule groups (managed vs custom) with capacity planning in WCU (Web ACL Capacity Units, 1500 default per ACL), managed rule groups (AWSManagedRulesCommonRuleSet, AWSManagedRulesSQLiRuleSet, AWSManagedRulesAmazonIpReputationList, AWSManagedRulesLinuxRuleSet, AWSManagedRulesWindowsRuleSet, AWSManagedRulesUnixRuleSet), custom rules (byte-match, regex pattern set, geo-match, rate-based), IP set and regex pattern set resources, rule priority ordering (lowest number evaluated first), action types (allow, block, count, CAPTCHA, Challenge), bot control managed rule group, account takeover. Triggers: create WAF rule, WAF managed rule group, WAF custom rule, WAF byte match, WAF geo match, WAF rate based rule, WAF IP set, WAF regex pattern set, WAF WCU budget, WAF CloudFront ACL, WAF logging Kinesis Firehose, WAF bot control, WAF ATP, WAF label matching, WAF Challenge action, WAF CAPTCHA.