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

# CloudTrail via existing S3 bucket

> Ingest CloudTrail events into Clarion from an existing S3 bucket using S3 event notifications and SNS — ideal for centralized, organization-wide logging.

CloudTrail writes its events as log files to an S3 bucket. If you have already set up CloudTrail, you most likely turned on delivery to an S3 bucket — or you use an existing solution such as Red Canary that consolidates CloudTrail logs there. Either way, every CloudTrail event ends up stored in S3.

To bring those events into Clarion, you configure the bucket to publish an **SNS notification whenever a new log file is added**, and Clarion subscribes to that topic. Each new file is fetched and turned into signals.

```
CloudTrail
  ↓
S3 bucket  (new log file added)
  ↓
S3 event notification
  ↓
SNS topic
  ↓
Clarion webhook
```

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/cloudtrail-trails-logging.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=83b6933655e81eeea9586bbe702ce4f4" alt="" width="3206" height="1254" data-path="images/aws/cloudtrail-s3/cloudtrail-trails-logging.png" />

<Note>
  This is one of two ways to connect AWS. For real-time CloudTrail management events, GuardDuty findings, or CloudWatch alarms delivered over SNS, see [AWS via EventBridge and SNS](/integrations/aws/eventbridge).
</Note>

<Warning>
  This setup sends Clarion an S3 object pointer, not the CloudTrail event body. Clarion must assume the customer-side IAM role configured in your AWS integration and read the referenced log file from S3. If the role is missing or cannot read the bucket, Clarion drops the pointer and those CloudTrail events are not ingested.
</Warning>

If the SNS subscription is confirmed but CloudTrail events are not appearing in Clarion, check the IAM role first. Clarion may be receiving the S3 notification but failing to fetch the referenced log object because the role does not have S3 read access.

***

## Before you start

**Pick the right account.**

* **Organization-level integration** — if your CloudTrail logging is centralized from all accounts into one bucket, use the **log-archive account** (or management account) that owns the CloudTrail bucket. One bucket, one SNS topic, and one Clarion subscription cover the whole organization.
* **Single account** — select the account that owns the trail and bucket.

You already have an existing S3 bucket for this flow. You can confirm exactly which bucket your trail writes to from the trail's **log location** in CloudTrail (covered in [Step 5](#step-5-notify-clarion-when-new-log-files-arrive)).

For organization-level trails, the role Clarion assumes must be able to read the bucket owned by the log-archive account. A role in only the member account that produced the CloudTrail event cannot read the centralized log object.

***

## Step 1 — Connect AWS and configure the IAM role

1. In Clarion, open the **AWS** integration page and click **Connect** at the bottom of the page.
2. Set up the IAM role first. For reading CloudTrail logs from S3, select these permission sets:
   * **Athena S3 log queries**
   * **S3 SSE-KMS log decryption**, only if your bucket uses SSE-KMS

The **Athena S3 log queries** permission set is the one that gives Clarion S3 read access for the log objects. The **CloudTrail events** permission set only grants CloudTrail API calls and is not enough for S3-backed ingestion.

3. The generated policy JSON appears on the right. You have two options to apply it — the **AWS Console** or the **AWS CLI** — and the instructions for both are shown there.
4. Once you have run the AWS CLI commands (or finished the setup in the AWS Console), set the **default region** and the **IAM Role ARN** you created.
5. Click **Configure IAM**.

<Warning>
  The generated policy uses `Resource: "*"` on every statement for convenience. Before production, deselect any permission sets you don't use and replace `"*"` with specific ARNs for your resources, such as S3 log buckets and KMS keys. Expand each permission set in the picker for per-set scope-down guidance.
</Warning>

<Warning>
  If your CloudTrail bucket uses **SSE-KMS** encryption, the **S3 SSE-KMS log decryption** permission is what lets Clarion read the encrypted log files. If the bucket's KMS key does not delegate to IAM, you also need to allow the Clarion role on the key policy — see [AWS via EventBridge → SSE-KMS](/integrations/aws/eventbridge#step-1b-cloudtrail-via-consolidated-s3-logging).
</Warning>

6. You can ignore the popup that offers to create an agent for now — we'll [create the agent in Step 6](#step-6-create-an-agent). First we need to set up SNS so Clarion is notified when new files are added to the S3 bucket.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/clarion-aws-connected-popup.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=7db14174fb3c22bf93c10ba499142f40" alt="" width="2136" height="1220" data-path="images/aws/cloudtrail-s3/clarion-aws-connected-popup.png" />

***

## Step 2 — Create an SNS topic

1. Open the Amazon **SNS** console and click **Create topic**.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/sns-topics-create-topic.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=4db44dbb86754485a47f03a1da36755d" alt="" width="3198" height="1192" data-path="images/aws/cloudtrail-s3/sns-topics-create-topic.png" />

2. Select the **Standard** type, give the topic a name (e.g. `clarion-cloudtrail-notifications`), and create it.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/sns-create-topic-standard.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=dcddb9de2196cc59cf90a4cc625ee79f" alt="" width="3200" height="1292" data-path="images/aws/cloudtrail-s3/sns-create-topic-standard.png" />

3. On the created topic, click **Create subscription**.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/sns-topic-created.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=abab8e262e1415f5ddc5738ecc552500" alt="" width="3208" height="1822" data-path="images/aws/cloudtrail-s3/sns-topic-created.png" />

4. Copy the **Topic ARN** shown in the details — you'll paste it into Clarion next.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/sns-create-subscription.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=b71f2fe7f42f2564f7386357011517ec" alt="" width="3190" height="1192" data-path="images/aws/cloudtrail-s3/sns-create-subscription.png" />

<Warning>
  S3 event notifications deliver only to an SNS topic in the **same region** as the bucket. Create the topic in the region of your CloudTrail bucket.
</Warning>

***

## Step 3 — Create the CloudTrail monitor in Clarion

1. Navigate back to Clarion and, on the AWS integration page, click **Add monitor**.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/clarion-add-monitor.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=c1c4df2740123aafe5dac020d04bea16" alt="" width="2780" height="1268" data-path="images/aws/cloudtrail-s3/clarion-add-monitor.png" />

2. Select **AWS CloudTrail**.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/clarion-select-cloudtrail-monitor.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=8452b89d0766624773c67c5f363423a7" alt="" width="1984" height="1330" data-path="images/aws/cloudtrail-s3/clarion-select-cloudtrail-monitor.png" />

3. Paste the SNS topic ARN into Clarion. Click **Add recommended filters** to apply Clarion's detection rules, then hit **Continue**.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/clarion-cloudtrail-monitor-config.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=e84172878629535a522df8656e8ddc75" alt="" width="1912" height="1528" data-path="images/aws/cloudtrail-s3/clarion-cloudtrail-monitor-config.png" />

4. Copy the **webhook URL**. You can ignore the rest of the instructions in the modal — simply close it by clicking **Done**.

***

## Step 4 — Subscribe Clarion to the SNS topic

Back on the SNS topic's **Create subscription** screen, point the subscription at the Clarion webhook:

1. Set the protocol to **HTTPS**.
2. Paste the Clarion webhook URL as the **Endpoint**.
3. Create the subscription. Clarion auto-confirms it.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/sns-create-subscription.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=b71f2fe7f42f2564f7386357011517ec" alt="" width="3190" height="1192" data-path="images/aws/cloudtrail-s3/sns-create-subscription.png" />

***

## Step 5 — Notify Clarion when new log files arrive

Now configure the S3 bucket to publish to the SNS topic whenever CloudTrail writes a new log file.

1. Open **CloudTrail** and select your existing trail.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/cloudtrail-select-trail.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=2e5dbc013dc6f894c0ec8e9d79360f86" alt="" width="3202" height="770" data-path="images/aws/cloudtrail-s3/cloudtrail-select-trail.png" />

2. Under the trail details, find the **Trail log location** — this is the S3 bucket your CloudTrail logs are stored in.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/cloudtrail-trail-details.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=6afc35a55294d7ffd6047825be2bd0f6" alt="" width="3190" height="1048" data-path="images/aws/cloudtrail-s3/cloudtrail-trail-details.png" />

3. Click the **Trail log location** link to open the bucket.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/cloudtrail-log-location-link.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=0b740d07382c5979194f389fbb68908c" alt="" width="3216" height="1186" data-path="images/aws/cloudtrail-s3/cloudtrail-log-location-link.png" />

4. Using the breadcrumb navigation at the top, navigate up to the bucket itself (out of the log-location folder).

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/s3-bucket-navigate.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=8b6e18b7d363d89ff126cd0b33b3404c" alt="" width="3214" height="1002" data-path="images/aws/cloudtrail-s3/s3-bucket-navigate.png" />

5. Open the **Properties** tab.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/s3-properties-tab.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=cd5fadcaed0b3ef973844d0a581b6cb1" alt="" width="3214" height="1120" data-path="images/aws/cloudtrail-s3/s3-properties-tab.png" />

6. Scroll down to **Event notifications** and click **Create event notification**.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/s3-create-event-notification.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=9d8902d138cdc101fc2c7048595ca318" alt="" width="2636" height="794" data-path="images/aws/cloudtrail-s3/s3-create-event-notification.png" />

7. Add an event name and select **All object create events**.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/s3-event-notification-config.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=6ba04b3ba1c547621e308c5702f4428d" alt="" width="3204" height="1566" data-path="images/aws/cloudtrail-s3/s3-event-notification-config.png" />

8. Scroll down to **Destination**, select **SNS topic** as the destination, and use the dropdown to select the SNS topic you created in Step 2. Then hit **Save changes**.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/s3-event-notification-destination.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=161d12edd3c7e193d9d203aa28036c79" alt="" width="3150" height="1172" data-path="images/aws/cloudtrail-s3/s3-event-notification-destination.png" />

<Check>
  Clarion is now subscribed and S3 will notify it on every new CloudTrail log file. Next, create an agent so those events get triaged.
</Check>

***

## Step 6 — Create an agent

1. Back in Clarion, select **Agents** on the left and click **Create agent**.

2. Select the **Cloud Security (AWS)** agent template and click **Continue**.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/clarion-create-agent.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=27827688df26f3a985a4106c342e1b31" alt="" width="3236" height="1572" data-path="images/aws/cloudtrail-s3/clarion-create-agent.png" />

3. Next to **Monitors**, click **Add** and select **AWS CloudTrail**.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/clarion-agent-template.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=81b156218f5325b1f3f79cc3fc52bd59" alt="" width="2254" height="796" data-path="images/aws/cloudtrail-s3/clarion-agent-template.png" />

4. You'll see the monitor you created earlier — select it, and it's assigned to your agent.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/clarion-agent-add-monitor.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=e13964aeb62b965f794240164f4f9416" alt="" width="2000" height="978" data-path="images/aws/cloudtrail-s3/clarion-agent-add-monitor.png" />

The agent's status automatically changes to **Watching** — you're all set.

<img src="https://mintcdn.com/cantinaclarion/XHieDbTRedG4Fqvu/images/aws/cloudtrail-s3/clarion-agent-watching.png?fit=max&auto=format&n=XHieDbTRedG4Fqvu&q=85&s=6b01abe7098418da3f9127ae3772c5b0" alt="" width="2284" height="814" data-path="images/aws/cloudtrail-s3/clarion-agent-watching.png" />

<Check>
  Done! Clarion now ingests CloudTrail events from your existing S3 bucket and your Cloud Security (AWS) agent triages them.
</Check>
