Before you start
You need:- a CloudFront distribution serving the hostname configured for the Qwairy brand;
- permission to configure Standard Logging v2, Firehose, IAM, CloudWatch, and an S3 failure-backup bucket;
- access to Measure > Crawler Analytics > Settings;
- a secure place to retain the one-time connector secret.
us-east-1.
Create and protect the key
- In Crawler Analytics settings, select AWS CloudFront.
- Select Create Key.
- Enter a name and the IANA time zone used for daily snapshots.
- Copy the secret when it appears. Qwairy shows only its prefix later.
- Store it as the Firehose HTTP endpoint access key. Do not add it to a URL, source repository, or CloudWatch log message.
Configure Firehose
-
In
us-east-1, create an Amazon Data Firehose delivery stream with an HTTP endpoint destination. -
Set the endpoint URL to:
-
Use the Qwairy connector secret as the Firehose Access key. Firehose adds the required
X-Amz-Firehose-Access-Keyheader. - Set the HTTP buffer size to 1 MiB and the interval to 60 seconds. Shorter delivery intervals are not supported by this connector.
- Enable S3 backup for failed HTTP deliveries and enable Firehose error logging in CloudWatch.
- Grant the Firehose role access to the backup bucket and required log resources.
Configure Standard Logging v2
- In CloudFront, create or edit a Standard Logging v2 configuration for the distribution.
- Select JSON output.
- Select the Firehose stream as the delivery destination.
-
Use exactly this field list:
This list excludes client address, query, cookie, and referrer fields.
- Enable the logging configuration.
Test delivery
After enabling both configurations, request a safe path on the distribution hostname with a recognized crawler User-Agent:Limits, delivery, and cost
- Keep the HTTP buffer at 1 MiB and 60 seconds. This keeps the base64 Firehose envelope inside Qwairy’s 2,000,000-byte wire boundary.
- A delivery can contain at most 10,000 Firehose records or parsed occurrences for this route.
- Upstream exclusions make the resulting crawler counts partial. Compare only equivalent CloudFront and Qwairy scopes.
- CloudFront logging, Firehose delivery, CloudWatch error logs, and S3 backup can each incur AWS charges.
- Shared Qwairy daily ingestion ceilings also apply.
Troubleshooting
- 401 from the HTTP endpoint: confirm that Firehose uses the current Qwairy secret as its Access key.
- 400 invalid delivery request: verify that the source is CloudFront Standard Logging v2, output is JSON, the exact field list is selected, and the Firehose request ID is preserved.
- 413 payload too large: restore the 1 MiB Firehose buffer and check that no transformation expands individual records.
- 415 unsupported encoding: use the Firehose HTTP delivery encoding supported by the setup and keep the destination content type as JSON.
- Firehose retries or writes to S3 backup: inspect CloudWatch delivery errors, IAM permissions, endpoint settings, and buffering hints.
- Qwairy stays pending: confirm that logging is enabled on the intended distribution and generate a current
GETorHEADrequest with a recognized crawler User-Agent to the configured hostname.

