Skip to content
Export guide · Web application firewalls

How to export your AWS WAF configuration, and what we check in it

Where you run it: AWS CloudShell (the CloudShell icon in the AWS console's navigation bar; the AWS CLI is already installed) or the AWS CLI on your own computer.

In short

AWS WAF configuration export: the file AWS WAF writes of its own settings, which a configuration review reads setting by setting without connecting to AWS WAF.

How to export the AWS WAF configuration, step by step, what the review checks in the file (34 checks run), and what it does not read.

The fileJSON, one file per web ACL (waf-<name>.json), exactly as get-web-acl writes it: a WebACL object with its rules
Checks run on it34
Highest grade its findings reachPROVEN
Feeds attack pathsNo
Not read from this export3 areas, listed below

Sources: AWS WAF documentation (1); AWS WAF documentation (2); AWS WAF documentation (3); the vendor table.

How to export it

Who can pull it
An IAM user or role allowed wafv2:ListWebACLs and wafv2:GetWebACL
Time
About 5 minutes for one web ACL; about a minute more for each further web ACL or Region.
The file
JSON, one file per web ACL (waf-<name>.json), exactly as get-web-acl writes it: a WebACL object with its rules

No console export: The file the review reads is the answer of the get-web-acl command, so the steps use the commands; this guide gives no console download for it. AWS CloudShell runs them inside the console, with no command line tools to install.

From the command line

  1. aws wafv2 list-web-acls --scope REGIONAL --region <region> --limit 100 --output json(lists your web access control lists (web ACLs), called protection packs in the new AWS WAF console, in one Region; <region> is the Region code, e.g. eu-west-1; each entry shows the Name and Id the next step needs. One call returns at most 100. If more are available, the answer holds a NextMarker value: run the command again with --next-marker <marker> added, where <marker> is that value, to get the next batch)

    The vendor's page, checked 2026-11-11
  2. aws wafv2 get-web-acl --name <name> --id <id> --scope REGIONAL --region <region> --output json > waf-<name>.json(once per web ACL, with the Name and Id from the list; for CloudFront web ACLs run both commands again with --scope CLOUDFRONT --region us-east-1)

    The vendor's page, checked 2026-11-11
  3. In CloudShell, choose Actions > Download file and enter waf-<name>.json (on your own computer the file is already in the folder you ran the command in) (if Actions has no Download file, CloudShell opened in the console toolbar: choose Open in new browser tab, then Actions > Download file)

    The vendor's page, checked 2026-11-11

What the file looks like

JSON, one file per web ACL (waf-<name>.json), exactly as get-web-acl writes it: a WebACL object with its rules. It varies with the number of rules in the web ACL: AWS documents no size. The upload takes files up to 10 MB.

What it holds: The Web ACL with every rule, rule-group reference, default action, and CloudWatch metrics settings.

Run these commands in bash (macOS, Linux, WSL, or AWS CloudShell): in Windows PowerShell 5.1, > writes UTF-16, which jq and the upload refuse.

Afterwards

In CloudShell, run rm waf-*.json, and delete the downloaded copies on your computer. The steps create no key, token, user or role, so there is nothing to revoke. If AWSWAFReadOnlyAccess, an inline policy or AWSCloudShellFullAccess was added for this export, ask your AWS administrator to remove it.

If the export goes wrong

What you seeThe fix
Access denied: "User: ... is not authorized to perform: wafv2:ListWebACLs" (or wafv2:GetWebACL), or CloudShell does not start and says "Unable to start the environment. You don't have required permissions. Ask your IAM administrator to grant access to AWS CloudShell"Ask your AWS administrator for the inline policy with the two actions, or to attach AWSWAFReadOnlyAccess to your IAM user or role, then run the command again. If CloudShell will not start, ask for AWSCloudShellFullAccess as well, or run the commands with the AWS CLI on your own computer.
The list comes back empty ("WebACLs": [])Your web ACLs are in another Region or protect CloudFront: run it again with --region set to the Region shown in the AWS WAF console, or with --scope CLOUDFRONT --region us-east-1.
The upload says "Invalid JSON" or that the file does not match any expected format, or the review finds no rulesUpload the waf-<name>.json that get-web-acl wrote (not the list output), and run the commands in bash or CloudShell, not Windows PowerShell 5.1, which writes the file as UTF-16.

What we read from it

Checks run
34 + 10 guidance items, not counted
Formats read
Web ACL JSON
Releases
2024.1 to current

Checks run is the number of checks that reached a result on this system's own export in our tests, as the vendor table shows it.

The areas checked

  • Each Web ACL: default action, rule order and rule groups
  • AWS managed rule groups (core, SQL injection, known bad inputs, bot control, IP reputation, anonymous IP) and whether they block or just count
  • Rate-based rules, geo rules and CAPTCHA actions
  • CloudWatch metrics settings

The grade its findings reach

Proven A finding from this file can reach PROVEN: the stored file is read a second time by a separate reader, and the finding is found at the setting it names.

Its findings stay in the review and its reports. AWS WAF does not feed attack paths.

Attack paths, the one change and dollar figures are MODELED. How each grade is worked out is on the method page.

What we do not read from this export

  • Logging: not in this export (the logging configuration is a separate call)
  • Sampled requests and match counts
  • Capacity units (WCU) per Web ACL
  • Unusual nested rule statements in depth
  • The addresses inside IP sets and the rules inside your own rule groups: not in this export (the web ACL holds their ARNs)

Limits of the reader

  • If your export leaves a section out, the review does not flag it as partial.
  • Findings stay in the review. They do not feed attack paths.
  • The checks of this system are not counted: a check counts once a test shows it firing on a file in the layout the vendor documents.

A finding never comes from what the file does not hold: live traffic, running hosts and logs are not in a configuration export.

Questions

Who can export the AWS WAF configuration?

An AWS Identity and Access Management (IAM) user or role that is allowed two actions, wafv2:ListWebACLs (AWS access level: List) and wafv2:GetWebACL (Read), because those are the two calls the commands make. Narrowest: ask your AWS administrator for an inline policy with those two actions on Resource "*" (IAM console → Users or Roles → the name → Permissions → Add permissions → Create inline policy). Easier: the AWS managed policy AWSWAFReadOnlyAccess. It allows more than this export uses: wafv2:Get*, wafv2:List*, wafv2:Describe* and wafv2:CheckCapacity (IP sets, rule groups, logging configuration, samples of recent web requests), waf:Get*, waf:List*, waf-regional:Get* and waf-regional:List* for AWS WAF Classic, and look-ups of the resources a web access control list (web ACL) protects. SecurityAudit, if you already have it, includes wafv2:ListWebACLs and wafv2:GetWebACL as well. To run the commands in AWS CloudShell, the same user also needs CloudShell permissions. The quick way is the AWS managed policy AWSCloudShellFullAccess (cloudshell:*), which AWS says "Grants permission to use AWS CloudShell with full access to all features": opening the shell, uploading and downloading files, and deleting the CloudShell home directory. For less, AWS lists the actions one by one: cloudshell:CreateEnvironment, cloudshell:CreateSession, cloudshell:GetEnvironmentStatus and cloudshell:StartEnvironment to launch CloudShell, cloudshell:PutCredentials to use your console sign-in inside it, and cloudshell:GetFileDownloadUrls for Download file. CloudShell permissions allow no action in IAM, AWS Config or AWS WAF: the commands inside still need the permissions above. On your own computer none of this is needed.

Does the export change anything?

Nothing in AWS WAF: the commands call a List action and a Read action. AWS CloudTrail records the calls. In AWS CloudShell, launching the shell creates a compute environment, and each waf-<name>.json stays in its home directory until you delete it or 120 days pass after your last session in that Region.

Does the file hold passwords or keys?

No passwords or access keys: the answer has no field for them. Still sensitive, in clear text: the account ID in every Amazon Resource Name (ARN), rule names and statements, custom response bodies, and the names and values of headers a rule inserts. Match strings (SearchString) are base64-encoded, which anyone can decode. Not in the file: the addresses inside IP sets and the rules inside your own rule groups. With redaction on (the default), the passwords, keys and tokens the review recognises are replaced with a placeholder before anything is stored; the check before upload shows how many it found.