The same prompt, two edges

Lab demonstration with synthetic data only. Not production code and not a statement about any customer's configuration.

AWS WAF can only look at the first part of a request body. On an Application Load Balancer that window is fixed at 8 KB (8,192 bytes). On Amazon CloudFront it is 16 KB by default and can be raised to 64 KB. This page sends one test prompt, with a marker string placed at a position you choose, to both edges and shows what each one saw.

The marker is a harmless test string. A WAF rule on the body matches it only if it sits inside the inspected window.

Choose a size and a position, then send.
Engineer view
(nothing sent yet)

Recorded results

Measured in the lab (whole HTTP body counts, JSON wrapper included). The marker is 8 bytes long; "boundary" is the last byte the WAF could still see.

EdgeBody inspection windowMeasured boundary
ALB + WAFfixed, 8 KB8,192 bytes
CloudFront + WAF, 16 KB setting16 KB16,384 bytes
CloudFront + WAF, 32 KB setting32 KB32,768 bytes
CloudFront + WAF, 48 KB setting48 KB49,152 bytes
CloudFront + WAF, 64 KB setting64 KB65,536 bytes

Client certificates and long streams

Browsers cannot easily present client certificates, so these are shown as commands with the results recorded in the lab.

Mutual TLS on an ALB listener
curl --cert client.crt --key client.key https://API_HOST/whoami     # trusted certificate: 200
curl https://API_HOST/whoami                                         # no certificate on a verify-mode listener: connection reset

Recorded: with verify mode on a listener shared by an API host and a dashboard host, clients without a certificate are refused on both hosts.

Server-sent events through CloudFront
curl -N "https://API_HOST/v1/stream?gap_ms=130000&tokens=3&heartbeat_ms=15000"

Recorded: with a 120 second origin response timeout, a gap longer than the timeout is cut; periodic SSE comment lines keep the stream open.

Documentation