Overview

CloudTrail records every API call made in your AWS account. Atatus reads those records directly from the S3 bucket your trail already writes to, so there is nothing to change about how CloudTrail itself is configured. Once flowing, CloudTrail events are analysed by the built-in AWS detection rules, such as console logins without MFA, IAM policy changes, S3 bucket policy modifications, access-denied bursts, root account activity, and more.
Collection starts from the moment you set it up. Objects already in the bucket are not ingested, so a trail holding years of history costs you nothing.

Requirements

Run the agent on one machine only. An EC2 instance is easiest, because it can use an instance role instead of long-lived access keys.

Collection modes

Choose one. With SQS, a notification only exists for objects created after you set it up, so old logs are unreachable rather than filtered out.

Step 1: Create the SQS queue (Mode A only)

Skip this section if you are using bucket polling.
Allow S3 to write to the queue. Save as queue-policy.json:
Then point the bucket at the queue. Save as notification.json:
S3 sends a single s3:TestEvent message when the notification is created. The agent consumes and discards it, so no action is needed.

Step 2: Create the IAM policy

The agent needs read access to the bucket, plus queue access in Mode A.

Mode A: SQS notifications

Mode B: bucket polling

Replace the region, account ID and bucket name with your own. These policies are read-only, so the agent never writes to your bucket and never deletes an S3 object.

Attaching the policy

On EC2 (recommended): attach the policy to the instance role of the machine running the agent. Nothing else to configure; the agent picks the role up automatically. Anywhere else: create an IAM user, attach the policy, and generate an access key:
Keep the AccessKeyId and SecretAccessKey from the output. You will need them in the next step.

Step 3: Configure the agent

Create /etc/atatus-infra-agent/conf.d/s3.d/s3.yml. One file covers every AWS log family delivered to S3, and source: picks the family. CloudTrail is shown here; VPC Flow Logs use the same file with source: vpc_flow.
The file must end in .yml. Files with any other extension are ignored without warning.

Mode A: SQS notifications

Mode B: bucket polling

Filled in, that looks like:
Check the real key path before setting bucket_list_prefix. If the trail was created with a custom S3 prefix, objects live under <prefix>/AWSLogs/<account>/CloudTrail/…, not AWSLogs/…. A prefix that matches nothing lists zero objects and reports no error, which looks exactly like “no logs yet”.Confirm with: aws s3 ls s3://my-cloudtrail-logs/ --recursive | head -3Leaving bucket_list_prefix out entirely reads the whole bucket, which always works but is slower on a large one.

Using access keys

If the machine has no instance role, add the credentials to the stanza:
Omit both keys entirely to use the standard AWS credential chain: environment variables, shared config, then the EC2/ECS instance role. Where the agent runs inside AWS this is the better option, because it keeps long-lived keys off disk.

Reading a bucket in another AWS account

If the bucket belongs to a different AWS account than the credentials above, add a role instead of asking that account for a user key:
The credentials above are then used for one call only (sts:AssumeRole), and everything else is read with the temporary credentials the role returns. See Reading an S3 bucket in another AWS account for the role, the two IAM policies, and how to verify it before restarting the agent.
Same account? You do not need a role. Attach the policy from Step 2 to your user or instance role and skip this.

Step 4: Restart and verify

Generate an event in AWS by signing in to the console or running any CLI command. CloudTrail delivers objects to S3 up to 15 minutes after the API call, so wait before concluding anything is wrong. Then open SIEM → Security Events in Atatus and filter on dataSource: cloudtrail.

Configuration reference

queue_url and bucket_arn are mutually exclusive, so set one, not both.

Send to Logs instead of SIEM

By default CloudTrail records become security events and run through the detection rules. To keep them as ordinary searchable logs instead:
Same collection, different destination. You can run two stanzas (one per bucket or account) if some should go to SIEM and others to Logs.

How it behaves

  • Only new logs are collected. Collection begins when the agent first starts with this configuration. To deliberately backfill a known window, set start_timestamp: "2026-08-01T00:00:00Z".
  • Restarts are safe. The agent records which objects it has already sent, so restarting the agent or rebooting the machine never re-sends them.
  • Multiple accounts and regions in a single bucket are picked up automatically, so you do not list them.
  • Digest files (CloudTrail-Digest/) are skipped; they hold integrity metadata, not events.

Troubleshooting

Errors appear in the agent log at /var/log/atatus-infra-agent/.
The agent logs first successful delivery once per endpoint when data first reaches Atatus. If you never see that line, the problem is upstream of the network, so check the listing and filter messages above.