Why teams monitor AWS CloudTrail with OpenSearch Security Analytics
Teams monitor AWS CloudTrail with OpenSearch Security Analytics when they need to watch management activity across an AWS account centrally and keep the resulting logs and detections inside infrastructure they control. CloudTrail records API calls made to the account, such as console sign-ins, IAM changes, and changes to logging or encryption settings, and those records are often the first evidence of suspicious account activity. Security Analytics includes AWS CloudTrail and S3 among its standard log types, so the parsing and detection content for that source is already part of the product rather than something the team must design from scratch.
A self-hosted SIEM fits when audit, data residency or contractual rules require that security logs stay in accounts, data centers or networks the organization operates, or when the organization wants to own its detection content and retention rather than send logs to a hosted service. It also fits teams that already run OpenSearch for logs and want one platform for search, detection and alerting. The trade-off is that the team carries the operating work: cluster sizing, index retention, access control on the log store, and keeping the log delivery path working after AWS-side changes.
Before building, confirm three things with the people who own the AWS organization: which accounts and regions must be covered, whether CloudTrail already writes to an S3 bucket that the SIEM can read, and who is allowed to see raw account activity in the SIEM. Those answers decide the collection design, the roles you will need in OpenSearch Security, and how much detection content you can enable on day one. Confirm the current log type details and supported fields against the Security Analytics log types reference before you write any detector.
From CloudTrail to alert: the data path
The path starts in the AWS accounts, where organization trails write CloudTrail records to an S3 bucket. A collector or ingest step then moves those records into an OpenSearch index mapped to the AWS CloudTrail log type. Detectors run Sigma rules against that index and raise findings, and alerts go to the SOC. The dashed boundary marks where the AWS account ends and the cluster you control begins, so check who can read the bucket, which role the collector uses, and where the alert notifications are sent.
CloudTrail records flow from AWS into a cluster you control, then to the SOC.
Collection and detection options and when each fits
This table compares the main collection and detection choices for CloudTrail monitoring in a self-hosted OpenSearch SIEM. Read each row as a decision: the effort, log volume and upkeep it adds, and what to confirm in the vendor docs before you commit.
| Decision | Option | Trade-off in effort, volume and maintenance | Confirm before choosing |
|---|---|---|---|
| Collection path | Direct S3 ingestion into OpenSearch | Fewer moving parts and no extra agent fleet, but you own object listing, parsing, retries and the mapping between CloudTrail JSON and the CloudTrail log type fields. | Which ingestion method your OpenSearch version supports for S3 and how it handles failed or duplicate object reads. |
| Collection path | Agent or intermediate pipeline | Adds a component to patch and monitor, and a buffer that can absorb spikes, but gives you a place to filter, enrich and route events before they reach the cluster. | The pipeline's supported delivery formats, its back-pressure behavior and who owns its upgrades. |
| Trail scope | Single-account trail | Smallest log volume and simplest IAM design, but every additional account needs its own trail, bucket access and onboarding steps that must be repeated. | How many accounts and regions are in scope and where each trail's logs land. |
| Trail scope | Organization-wide trail | Central coverage with one trail to manage, but one bucket can hold very large volumes, and member accounts or new regions must be checked as they are added. | Your organization's management account rights, delegated administrator options and the retention policy on the central bucket. |
| Detection content | Prepackaged CloudTrail rules | Fastest path to working detections and less rule authoring, but you must review each rule for false positives in your own accounts and tune it as usage changes. | Which rules ship with your OpenSearch version, their severity values and the log fields each one requires. |
| Detection content | Custom rules or imported Sigma rules | Fits your own cloud patterns, such as specific role names or approved automation, but adds authoring, testing and change control work that grows with each rule. | How the rule editor handles the CloudTrail field names you plan to match and how rules are versioned and exported. |
| Alert handling | Alerts routed to existing tools | Keeps alerts in the team's current queue, but requires notification channel setup and testing of delivery under load. | Which notification channels the plugin supports in your release and any authentication they require. |
| Alert handling | Alerts kept in the OpenSearch views only | Lower setup effort, but relies on analysts checking dashboards, which makes coverage depend on routine discipline. | How findings and alerts are retained, filtered and grouped in your version's Security Analytics views. |
Setting up CloudTrail monitoring step by step
This sequence takes CloudTrail events from AWS into a self-hosted OpenSearch cluster, applies the CloudTrail detection content, and routes alerts to your responders. Each step ends with a check so the team knows the pipeline works before relying on it.
Confirm the CloudTrail log type in the docs
Before building anything, the cloud security engineer checks the OpenSearch supported log types reference to confirm the AWS CloudTrail log type and its expected fields for the Security Analytics version you run. Note the version, since field names and bundled rules can change between releases. The step is done when the team has a written record of the log type name, the version it was checked against, and the fields the detector will query.
Create or verify the organization trail
The AWS account owner confirms that a CloudTrail trail covers all accounts and regions that matter, with log file validation turned on and delivery to a dedicated S3 bucket that the SIEM team controls. Check that the bucket is protected against deletion and that the trail is logging. The step is complete when a recent test API call appears as a log object in the bucket and the validation setting is confirmed in the trail configuration.
Grant the collector least-privilege read access
The AWS administrator creates a dedicated identity for the log collector with read-only permission on the CloudTrail bucket and the objects it needs, and nothing else. The OpenSearch team stores its credentials in the secrets system they already operate. The step is complete when the collector can list and read a test object and is denied writes or deletes on the same bucket.
Configure the index and field mappings
The OpenSearch administrator creates the index that will receive CloudTrail events and aligns its field mappings with the CloudTrail log type. Decide retention and index naming before the first load so that rollover and deletion policies can be applied from the start. The step is done when an index template exists in the cluster, the mapping is visible in Dashboards, and a sample document shows timestamps and identity fields with the expected types.
Ship CloudTrail and S3 logs into the index
The log pipeline engineer configures the collector to read new objects from the S3 bucket and index them into the CloudTrail index, handling retries and dead-letter storage for failed records. Confirm that the pipeline handles compressed log files and gaps after an outage. The step is complete when event counts in the index grow with new AWS activity and the failure queue is empty or explained.
Create the CloudTrail detector and apply rules
In Security Analytics, the detection engineer creates a detector for the CloudTrail log type, points it at the index, and selects the applicable prepackaged rules. Review each rule's logic against your account structure and disable rules that do not fit, recording the reason for each change. The step is done when the detector runs on its schedule and produces findings for test activity, which the team can see in the findings view.
Configure alert notifications
The SOC lead connects the detector's alerts to the notification channel the on-call team uses, and sets severity thresholds so that low-value findings do not page anyone. Agree who acknowledges alerts and where incidents go next. The step is complete when a test alert reaches the channel and the recipients confirm they received it.
Run an end-to-end test event
The security engineer performs a controlled, documented action in a non-production account, such as creating and deleting a test identity or changing a test policy, that matches a rule in the detector. Track it from the AWS event through the bucket, the index, the detector finding and the alert. The step is done when every hop is confirmed and the timing and gaps are written down for the runbook.
Which CloudTrail detections to start with
Identity changes are where many account compromises become durable. A person who gains console or API access often tries to create a new user, attach a stronger policy, add access keys, or change trust relationships so that access survives a password reset. Rules in this group look for administrative calls that alter users, roles, policies and keys, especially when the caller is not a known administration path.
- Principal creation: calls that create users, roles or access keys, watched closely when they come from a principal that does not normally administer IAM.
- Policy changes: attaching or updating policies, particularly broad permissions granted to existing identities.
- Trust and credential changes: edits to role trust relationships or login profile resets that let a new principal take over an account.
- Root and privileged use: any activity by the root identity, which should be rare and expected in your environment.
Check that the detections match how your administrators actually work, including infrastructure pipelines that legitimately create roles.
An attacker who wants to avoid detection often tries to stop or weaken the audit trail before doing anything else. Changes to trail configuration, logging status or the storage that holds logs are therefore high-value signals even when no other activity looks unusual. These rules should alert quickly because a missed event here can hide everything that follows.
- Trail stop or delete: calls that stop logging or remove a trail.
- Trail configuration edits: changes to event selectors, log file validation or destination buckets.
- Log storage changes: policy or lifecycle changes on the bucket that receives CloudTrail logs, including deletion of log objects.
- Key changes: changes to the encryption key used for log files, which can break ingestion or hide tampering.
Confirm that your own change process for trails is documented, so that approved changes can be separated from suspicious ones during triage.
Valid credentials used from an unexpected place or at an unexpected time are a common sign of account takeover. Rules in this group compare who is calling the API and from where against a baseline of normal behavior. They are the most sensitive to environment details, so they need the most tuning after the first deployment.
- Source location and agent: console logins or API calls from networks, regions or user agents that the organization does not use.
- Failed and unusual logins: repeated failed console sign-ins, or sign-ins without expected multi-factor authentication.
- Service misuse: a service principal or automation role calling APIs outside its normal set of actions.
- Discovery behavior: bursts of list and describe calls across many services, which often precede privilege escalation.
Build the list of approved networks, regions and automation roles with the platform team before you judge whether an alert is noise or a real finding.
Some risky changes do not involve identities at all. They make data or compute reachable by outsiders, for example by making a storage bucket public or opening a security group to the internet. These events are often configuration mistakes rather than attacks, so the rules should help a team fix exposure quickly as well as detect abuse.
- Public storage access: changes to bucket policies, access control or public access blocks that expose objects.
- Network exposure: security group or network access list changes that open administrative ports or broad address ranges.
- Encryption and sharing changes: disabled encryption defaults or snapshots and images shared with other accounts.
- Infrastructure changes outside pipelines: resource changes made by hand instead of through your normal deployment path.
Decide in advance who receives these alerts, because exposure findings usually belong to a platform or application owner rather than the central SOC.
Security and operational considerations for a CloudTrail SIEM
A CloudTrail detection platform holds a record of every action taken in your AWS accounts, so the SIEM needs the same protection as the systems it watches. The cards below cover access to the cluster and its data, credentials and bucket hygiene, and the operational load of index growth, detector schedules and alert volume.
TLS and SSO for the cluster
Enable TLS for node-to-node and client traffic, and connect the OpenSearch Security plugin to your identity provider through SAML or OpenID Connect so analysts sign in with their corporate accounts. Confirm who can reach the Dashboards endpoint from which networks, and confirm how certificates are issued and rotated before the first detector runs. A single shared admin login should not be the way analysts reach CloudTrail findings.
OpenSearch security docsRole-based and field-level access
CloudTrail records contain user identities, source IP addresses and API parameters that many teams should not see in full. Define roles for detection engineers, SOC triage and read-only reviewers, and apply document-level and field-level security or field masking to sensitive fields such as request parameters. Test each role with a sample account so you know what a restricted user actually sees in findings and alerts.
Audit logging of the SIEM
Turn on audit logging in the Security plugin so you can answer who searched, changed a detector, edited a rule or exported findings. Ship those audit records to a store that the SIEM administrators cannot edit, and review them on a schedule. Without this, a compromised analyst account could alter detections without leaving a trail.
Least-privilege IAM for log readers
The role that reads CloudTrail objects from S3 needs only s3:GetObject and s3:ListBucket on the specific trail prefix, plus any KMS decrypt permission if the bucket is encrypted. Do not reuse administrator keys or a broad read role across accounts. Document which principal the ingestion pipeline assumes, and review that trust policy whenever the pipeline changes.
S3 bucket protection and retention
Keep the CloudTrail bucket in a separate security account where workload administrators cannot delete or overwrite objects. Confirm versioning, object lock or an equivalent deletion control, and a lifecycle rule that matches your retention obligations. The SIEM index is a searchable copy, so its retention can be shorter than the bucket retention, and the bucket is the record you rely on if an investigation needs older events.
Credentials and secrets handling
Keep access keys, passwords and the OpenSearch admin credentials out of configuration files and shell history. Use the platform's secrets store or instance roles for the ingestion pipeline, rotate credentials on a set schedule, and record who holds break-glass access. Confirm how your pipeline tool retrieves its secrets and whether those secrets appear in its logs.
Index growth and storage planning
CloudTrail volume grows with the number of accounts, regions and API-heavy services such as S3 and IAM. Measure daily ingest over a representative period, then set index lifecycle rules, shard counts and disk thresholds from that measurement. Ask your cluster team how replicas are placed across nodes, since losing a node should not stop detection.
Detector schedules and alert fatigue
Each detector runs on a schedule, and a short interval on a high-volume log type multiplies query load. Start with a longer interval, measure the query time, and only shorten it for rules that need fast response. Review which rules produce most of the alerts each week, then tune thresholds, exclusions for known automation roles and severity levels, so analysts keep time for the alerts that matter.
Questions buyers ask about CloudTrail monitoring with OpenSearch
What drives the cost of monitoring CloudTrail with OpenSearch Security Analytics?
The main cost drivers are the number of AWS accounts and regions, the volume of CloudTrail and S3 log data you ingest, how long you retain it, and how many detection rules you tune and maintain. Software cost is not the largest line item because the OpenSearch project is released under the Apache License, Version 2.0, and the OpenSearch FAQ does not describe a paid edition. The remaining costs are infrastructure you pay your cloud or data center provider for, plus the engineering time to design the pipeline, write or tune rules and run alert handling. Ask any partner for a quote that separates one-time build work from recurring hosting, storage and support, and that states what volume and retention it assumes.
How long does it take to set up and tune CloudTrail detections?
Duration depends on how many accounts and trails are in scope, whether the cluster already exists, how clean the log data is, and how many detections your security team wants to validate before they page anyone. A single account with an existing cluster is a much smaller job than a multi-account organization with new hosting, a log delivery design and a review of noisy rules. Tuning usually takes longer than the first deployment because rules need real traffic before false positives are understood. Ask for a timeline built from a written scope, with milestones for log ingestion, detector validation and alert routing.
What do we need to provide before work starts on CloudTrail monitoring?
You need to provide several things before the build begins:
- Access to the AWS organization or accounts where CloudTrail is enabled, with a plan for who approves changes to trails and S3 buckets
- Confirmation of which trails, regions and S3 buckets hold the logs, and how long they must be kept
- A self-hosted OpenSearch cluster in infrastructure you control, or a decision on where it will run
- Named contacts for security operations who will receive alerts and approve detection changes
- Your identity and access rules for analysts, so that roles and single sign-on can be planned with the cluster
Confirm the exact AWS permissions and retention rules with your own cloud and compliance teams, because they differ by organization.
Can our internal team set up CloudTrail monitoring in OpenSearch alone?
A team with experience running OpenSearch, AWS logging and detection engineering can often do it alone, provided it has time to build and tune the work. The skills involved are cluster operations, securing access with the OpenSearch Security plugin, configuring CloudTrail and S3 log delivery, and writing and validating detection rules. If one of those skills is missing, the most common gap is detection tuning, because it needs both security knowledge and familiarity with how CloudTrail records events. Many organizations use a partner for the initial build and then keep rule maintenance in house. Decide this based on a skills review of your own team, not on the license terms.
Is OpenSearch Security Analytics free to use under Apache 2.0?
All software in the OpenSearch project is released under the Apache License, Version 2.0, and the OpenSearch FAQ does not describe any paid edition. That means the software itself carries no license fee for self-hosting. Your costs are the infrastructure, storage, staff time and any services you buy, such as implementation or support. Read the license and the trademark policy with your legal team before you rename or redistribute anything, because licensing questions are separate from the software cost. The OpenSearch Software Foundation is a Linux Foundation project, and it does not provide technical oversight of the project.
How do we ask for a fixed-scope quote for CloudTrail monitoring?
Ask for a written scope that lists the accounts and regions in scope, the log types you need, the cluster you will use, the number of detections to deliver, the alert routing you require and what testing counts as done. DeployOpen works on fixed-scope engagements, with scope, deliverables and timelines agreed in writing before work starts, and it does not publish a price list. A quote follows from that written scope. Ask any provider to separate one-time build work from recurring costs, to list the assumptions about data volume, and to state what is excluded, such as ongoing rule tuning or a retainer for continuous support.
Which CloudTrail and S3 log types does OpenSearch Security Analytics support?
Security Analytics includes AWS CloudTrail and S3 among its standard log types, so you can use prepackaged log type definitions rather than building field mappings from scratch. Engineers should still check the current field mappings against the log format their trails produce, and confirm how CloudTrail and S3 logs reach the cluster in your environment. Review the supported log types reference for the version you run before you commit to a design. If a source does not match a standard log type, plan for a custom log type instead.
Deciding whether to build the CloudTrail pipeline in-house
The decision starts with ownership: whether your team already runs AWS logging and can keep CloudTrail and S3 delivery running. Next comes hosting, meaning whether the OpenSearch cluster will sit in infrastructure you control, and whether you have SOC staff who will triage alerts. If the answers point to gaps, a partner can help scope the work, and deferring is a valid choice when none of the prerequisites are in place. Check each branch against the owners named in your organization, not against the tool.
Decision path for building the CloudTrail pipeline internally, partnering, or deferring.
Where to read the official documentation
Start with the OpenSearch log types reference to confirm that AWS CloudTrail and S3 are standard log types in Security Analytics and to see which fields the standard mapping expects. This page answers the question of what the built-in CloudTrail log type covers, which is the first thing to compare against your own trail configuration. Read it alongside your actual CloudTrail records, because the mapping describes the schema the detector expects and your trails may add fields, nest events differently or write to S3 in a layout that your ingestion pipeline must handle. Re-check the page against the release you plan to run, since log type definitions and the rules bundled with them can change between minor versions. Record the version you tested so that a later upgrade has a baseline to compare against.
The OpenSearch security documentation answers how the detector's access is controlled: which identity backend authenticates analysts, how roles restrict who can view findings, alerts and index data, and whether audit logging is enabled for administrative changes. Use it to confirm that the roles which can read CloudTrail indices are separate from those that can edit detectors or rules, since CloudTrail records contain account identifiers, IP addresses and principal names that many organizations treat as sensitive. Before go-live, verify TLS for node and client traffic, the authentication backend your analysts will use, and whether document or field level restrictions are needed for specific accounts. Ask your security team to confirm these choices against your own policy, because the documentation describes available controls but not the right combination for your organization.
How DeployOpen scopes and delivers CloudTrail monitoring
DeployOpen plans, builds, tests and documents CloudTrail monitoring in a self-hosted OpenSearch Security Analytics deployment inside infrastructure you control. Each engagement is fixed-scope, with the log sources, detectors, alert routes and deliverables agreed in writing before work starts.
How we scope
- Inventory the AWS accounts, regions and CloudTrail trails whose activity must reach the SIEM.
- Confirm where CloudTrail and S3 log delivery will land, and who owns each bucket and its access policy.
- Agree in writing which standard log types, rules and alert channels are in the written scope.
How we build
- Set up the ingestion path for CloudTrail and S3 logs into OpenSearch, then verify field mapping against the CloudTrail log type.
- Enable and tune the relevant detectors, documenting each rule's purpose, severity and expected false positive sources.
- Test detections with replayed or controlled sample events, and record which alerts fired and which did not.
How we hand over
- Deliver a runbook covering pipeline configuration, detector inventory, alert routing and change steps for rule updates.
- Walk your security and platform teams through alert triage, rule tuning and how to add a new trail or account.
- Document access roles, retention settings and the evidence your compliance team can review for this monitoring.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, scoped separately from the build.
- Retainer work can cover OpenSearch version upgrades, detector updates and retesting after AWS account changes.
- Ask any provider to confirm response times, upgrade windows and what a retainer includes before signing.

