> ## Documentation Index
> Fetch the complete documentation index at: https://www.conductor.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate CloudFront with Conductor Intelligence

> Send log file data from CloudFront to Conductor Intelligence's Pages report.

<Warning>
  Note that the instructions in this article describe the process for integrating with Conductor Intelligence. You can also integrate CloudFront for Conductor Monitoring's [Log File Analysis](/docs/monitoring/setting-up-the-cloudfront-integration/) feature.
</Warning>

Integrating [CloudFront Standard logging](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/standard-logging.html) with Conductor Intelligence consists of:

* Install the AWS Command Line Interface (CLI)
* Find your AWS account ID and CloudFront distribution ID
* Enable log files and creating an [AWS S3 bucket](https://aws.amazon.com/s3/) in Conductor Intelligence.
* Configure CloudFront Standard logging with the AWS CLI.

## Install the AWS Command Line Interface (CLI)

You'll need to use the AWS CLI to configure the v2 connection with CloudFront below. You can also use the CLI to find your account ID and distribution ID.

To download and install this CLI, refer to Amazon's documentation: [Getting started with the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)

## Finding your AWS account and CloudFront distribution ID

Once the AWS CLI is installed on your machine, you can perform the following commands to find your AWS account ID and the distribution IDs associated with the subdomains you want to configure to show log file data in Conductor Intelligence.

### Find your account ID

From your terminal, enter the following:

```bash theme={null}
aws sts get-caller-identity --query "Account" --output text
```

### Find your distribution ID

You'll integrate CloudFront to a specific subdomain in Conductor Intelligence. If different distributions host different subdomains in CloudFront, you'll need to find multiple distribution IDs. However, if you use the same distribution ID for all your subdomains in Conductor Intelligence, you'll only need to find one.

From your terminal, enter the following:

```bash theme={null}
aws cloudfront list-distributions \
  --query "DistributionList.Items[*].[Id, DomainName, join(', ', Aliases.Items || [''])]" \
  --output table
```

A table is printed with a list of distribution IDs and their related domain aliases. Copy down the relevant distribution IDs for the subdomains you want to integrate in Conductor Intelligence.

## Enabling log files and creating an AWS S3 bucket in Conductor Intelligence

In Conductor Intelligence:

1. Go to the [Pages & Crawling](https://app.conductor.com/u/pages-and-crawling) settings activity (**Settings** > **Pages & Crawling**).
2. From the list of configured subdomains, identify the subdomain with the pages for which you want to see log file data.
3. In the **Log Source** column for that subdomain, click **Connect**.
4. In the CloudFront section, from the **Connect a log source** window, click **Connect**.
5. In the **Connect Amazon CloudFront** window:
   1. Enter your **AWS Account ID** and the **CloudFront Distribution ID** for this subdomain.
      <Frame>
        <img src="https://mintcdn.com/conductor-0f65a05d/JYB26t33RXvVSQWE/images/intelligence/cloudfront-create-bucket.png?fit=max&auto=format&n=JYB26t33RXvVSQWE&q=85&s=6c6f4feaa82c29c6027fc077b91431e3" alt="CloudFront Create Bucket" width="834" height="503" data-path="images/intelligence/cloudfront-create-bucket.png" />
      </Frame>
   2. Click **Create Bucket**. Conductor Intelligence will generate the AWS S3 bucket and provide you with the commands you'll need to run to complete this integration.

## Configuring CloudFront Standard logging

In the AWS CLI, complete the integration using the commands found in the **Connect Amazon CloudFront** window:

<Frame>
  <img src="https://mintcdn.com/conductor-0f65a05d/JYB26t33RXvVSQWE/images/intelligence/cloudfront-cli-commands.png?fit=max&auto=format&n=JYB26t33RXvVSQWE&q=85&s=d3198c432ffcd342973c15154e2a05af" alt="CloudFront Copy Commands" width="834" height="737" data-path="images/intelligence/cloudfront-cli-commands.png" />
</Frame>

After completing the CLI workflow, CloudFront will begin sending logs to Conductor Intelligence.

## Filter away non-search engine traffic

To ensure you capture visits from all of the bots for which Conductor supports detection, you might need to create filters for your log files. Be sure you allow all of the following user agents:

* bingbot
* Googlebot
* OAI-SearchBot
* ChatGPT-User
* GPTBot
* PerplexityBot
* Perplexity-User

**(Note:** These strings are case sensitive. Confirm you have the precise upper- and lower-case letters.**)**

<Info>
  **Allowing user agents in CloudFront**

  Because this configuration is performed in CloudFront, and the way your organization configures your CloudFront instance will depend on a variety of factors, we recommend reviewing [CloudFront's documentation for configuring its "Bot Control" feature](https://docs.aws.amazon.com/waf/latest/developerguide/waf-bot-control-examples.html).
</Info>

## Disabling Log File Data in Conductor Intelligence's Pages Reports

1. In **Pages & Crawling**, hover over the subdomain for which you want to remove CloudFront and click **Edit** in the **Log Source** column.
2. In the bottom-right of the **Connect CloudFront** form, click **Remove**.
3. Click **Remove Log Source** to confirm.

Conductor Intelligence cannot access your AWS account, so you also need to disable standard logging manually in AWS.

## FAQs

### How do I resolve errors?

Be sure your AWS account has access to the AWS region where the target bucket is located. You can find the bucket region in the Connect Amazon CloudFront form.
