When a business moves to the cloud, audit logs often end up scattered across multiple systems. The cloud provider’s control panel records some events; guest operating systems, applications, 1C, and databases record others. Cloud logging becomes useful for security only when these streams are brought together: events must be collected without loss, S3 log storage must be protected against retrospective tampering, and a SIEM or a set of detection rules must help identify anomalies quickly.
This guide explains how to build that pipeline, from log collection and reliable delivery to immutable S3 storage, retention, compliance, and incident investigation.
Which Logs Matter for Security, and Who Collects Them in the Cloud?
Audit logs vs. technical logs: what is the difference?
Technical logs help developers troubleshoot applications. They contain traces, errors, and response times, and may be deleted after a relatively short period. Audit logs record who did what to which resource and when. They may serve as evidence during a security investigation or compliance audit, so completeness, integrity, long-term retention, and accurate timestamps are essential.
Every audit event should answer five questions:
- Who? A user, service account, or access-key identifier.
- What happened? The operation performed, such as creating a resource, changing permissions, deleting a snapshot, or signing in.
- When? The event time in UTC, ideally with millisecond precision.
- Which resource? The identifier of the affected object.
- With what result, and from where? Success or failure, IP address, user agent, and client information.
A normalized event might look like this:
{
"event_time": "2026-09-14T02:17:43.512Z",
"ingest_time": "2026-09-14T02:17:44.090Z",
"source": "cloud-api",
"actor": {
"type": "service_account",
"id": "sa-backup-01",
"key_id": "AK7F…"
},
"action": "vm.snapshot.delete",
"resource": {
"type": "snapshot",
"id": "snap-4412",
"project": "prod-erp"
},
"outcome": "success",
"client": {
"ip": "185.xx.xx.17",
"user_agent": "python-requests/2.32"
}
}
This event immediately raises a question: why is a backup service account deleting snapshots in the middle of the night through a script originating from an external IP address?
What the cloud provider logs—and what the customer must collect
| Log source | Who collects it? | Typical events |
|---|---|---|
| Cloud control panel and API | Cloud provider | Console sign-ins, VM creation and deletion, snapshots, network-rule changes |
| Cloud accounts and roles | Cloud provider | Role assignments, access-key creation, MFA changes |
| Hypervisor and physical infrastructure | Cloud provider; not necessarily directly accessible to the customer | VM migrations, personnel access to physical equipment |
| Guest operating system | Customer |
auditd, journald, Windows Event Log, Sysmon
|
| Applications, 1C, and databases | Customer | Sign-ins, data changes, exports, permission changes |
| Networks inside VMs and the customer’s perimeter | Customer | Firewall, VPN, and proxy logs |
The first two categories are easy to overlook because the provider may retain control-plane logs for only a limited period. Export these events regularly through an API into your own storage. Before an incident occurs, also agree with the provider on how to request hypervisor-level events when investigating suspicious activity.
Collecting and Delivering Events Without Losing Data
Agents, formats, and reliable delivery
For Linux, a basic collection stack can use rsyslog or Fluent Bit, while Vector offers more advanced routing and transformation. For Windows, consider Winlogbeat or Windows Event Forwarding (WEF). Common transport and event formats include syslog under RFC 5424, CEF, and LEEF, which are supported by many SIEM platforms.
Choose a common field schema, such as Elastic Common Schema (ECS) or the Open Cybersecurity Schema Framework (OCSF), and normalize events from different sources before writing them to the archive. Consistent field names make searches and correlation rules easier to maintain.
Events are often lost at the boundaries between systems: a network link fails, a collector restarts, or a SIEM rejects events after a licensing limit is reached. Three measures help reduce this risk:
- Buffer events to disk. Configure a local buffer on each agent, such as Fluent Bit’s
storage.type filesystemor Vector’s disk buffer. Size it to withstand several hours of downtime at peak event volume. - Use delivery with acknowledgements and retries. Consider RELP instead of UDP-based syslog, HTTP delivery with retries, or Kafka for high-volume streams.
- Track two timestamps. Store both
event_timeandingest_time. Use ingestion time when extracting events so that delayed arrivals are not accidentally excluded from an investigation.
Time synchronization is equally important. Use chrony or NTP with a consistent time source across systems. Even a 30-second discrepancy can make it difficult to reconstruct the sequence of an attack.
The 1C event log as a source of security signals
In Russia, 1C is widely used for accounting, ERP, and other business processes. Its event log can therefore be a valuable security source. However, the log often resides on the same server as the application database and may be accessible to a 1C administrator. Export it to a separate system as soon as possible.
Prioritize these events:
- Session authentication and authentication failures: useful for detecting password guessing and sign-ins using service accounts.
- User changes: especially the assignment of roles with full privileges.
- Changes to the information base’s event-logging settings: a reduction in logging detail should itself trigger an alert.
- Mass data changes or deletions and information-base exports.
The 1C event log may use .lgf/.lgp or .lgd files, and some Russian SIEM products provide ready-made parsers or normalizers for these formats.
Configure a silence alert for every important source. If a source that normally sends events stops reporting for 15 minutes, treat it as a potential incident until the cause is understood. A missing stream can be just as significant as a suspicious event.
Storing Logs in S3: An Archive That Cannot Be Quietly Altered
Bucket structure, formats, and tamper protection
Organize objects using key-value prefixes. For example:
s3://sec-audit-archive/source=cloud-api/type=iam/dt=2026-09-14/hour=02/part-0001.jsonl.zst
This layout makes it easier to select data by source, event type, date, and hour. Query engines such as ClickHouse, Trino, and DuckDB can read only the objects needed for a particular analysis.
Store raw events as compressed JSON Lines using zstd. For analytical workloads, convert them to Parquet: its columnar format generally compresses well and allows query engines to read only the fields they need. As a starting point, aim for object sizes of 64–256 MB. Millions of tiny files can slow down both ingestion and querying.
Build protection for the archive in layers:
- Separate the bucket and credentials. Give the collection agent write-only permissions, such as
PutObject, and prevent infrastructure administrators from automatically inheriting access to the archive. - Enable versioning and Object Lock (WORM). In Governance mode, users with the required special permissions may be able to bypass retention. In Compliance mode, protected objects cannot be deleted or overwritten before the retention period expires, including by the bucket owner. An incorrectly configured Compliance retention period cannot simply be cancelled, so storage costs may continue until it expires.
- Verify integrity. Have the collector generate a manifest of object SHA-256 hashes every hour, linking each manifest to the previous one with a hash. Comparing the chain helps reveal tampering.
- Configure lifecycle policies. Move older data to a lower-cost storage class and delete objects when their retention period ends, provided no longer retention requirement applies.
Available protection modes depend on the storage platform. Verify the provider’s implementation and limitations before designing the archive.
Cloud4U’s S3 object storage is built on Cloudian and supports the Amazon S3 API. That compatibility makes it suitable for integration with S3-compatible collection agents and query engines. Its documented compliance capabilities include support for Russian personal-data requirements under Federal Law No. 152-FZ; confirm the precise service configuration and applicable compliance scope before relying on it for a regulated workload.
How much space do logs require, and what does storage cost?
Consider an example environment with 150 VMs, a 1C system serving 300 users, and a perimeter firewall. After filtering, assume the environment generates around 1,500 events per second (EPS), with an average event size of 700 bytes.
- Per day: approximately 90.7 GB of raw data, or 33.1 TB per year.
- With 1:8 compression: approximately 11.3 GB per day, or 4.1 TB per year.
Using the source article’s indicative storage prices—RUB 2 per GB per month for object storage and RUB 10 per GB per month for SSD index storage—and assuming indexed data occupies 1.1 times the raw volume across two copies, the comparison looks like this:
| Storage model | Storage capacity | Monthly storage cost | Cost over 12 months |
|---|---|---|---|
| All 12 months in S3 (compressed) | 4.1 TB | Approximately RUB 8,300 | Approximately RUB 99,000 |
| All 12 months in the index | 72.8 TB | Approximately RUB 728,000 | Approximately RUB 8.7 million |
| 30 days in the index + 12 months in S3 | 6.0 TB SSD + 4.1 TB S3 | Approximately RUB 68,000 | Approximately RUB 818,000 |
These figures are illustrative, based on the assumptions and prices above. They exclude compute resources and software licences, and actual costs depend on the provider’s current tariffs, data volume, redundancy, requests, and retention settings.
The main architectural lesson remains: keeping every event in a high-performance SIEM index for a full year can cost substantially more than keeping recent events in the index and archiving the complete stream in S3. SIEM licensing may also be based on EPS, so send the events needed for detection and correlation to the SIEM while retaining the complete stream in the archive.
Log Retention Periods and Compliance Requirements
The right retention period depends on the systems involved, the applicable regulations, and the organization’s own risk and investigation requirements. The following table summarizes the frameworks cited in the Russian source and should be treated as a planning reference rather than legal advice.
| Requirement or environment | Relevant framework | What needs to be logged | Retention period |
|---|---|---|---|
| Personal-data information systems | Federal Law No. 152-FZ, Government Resolution No. 1119, FSTEC Order No. 21 (RSB control group) | Security events and log protection | The cited order does not establish a universal period; the source references a FSTEC 2014 guidance document for state information systems recommending at least three months |
| State information systems (GIS) | FSTEC Order No. 117, which replaced Order No. 17 from 1 March 2026 | Security-event registration | Follow the current edition and applicable FSTEC methodologies |
| Significant critical information infrastructure (CII) facilities | Federal Law No. 187-FZ and FSTEC Order No. 239 (AUD control group) | Event registration and monitoring | Determined by the applicable CII requirements |
| Financial organizations | GOST R 57580.1-2017 | Information-security event logging | Follow the applicable Bank of Russia requirements |
| Payment-card data | PCI DSS v4.0.1, Requirement 10.5.1 | Audit logs for the cardholder data environment | At least 12 months, with the most recent three months immediately available |
| Information security management systems | ISO/IEC 27001:2022, controls 8.15 and 8.17 | Logging and time synchronization | Determined by the organization |
A common architecture is to keep the most recent 30–90 days in a SIEM or searchable index and retain the complete log stream in S3 with Object Lock for the required period. PCI DSS, for example, specifies 12 months of audit-log retention, with the latest three months immediately available.
Set the retention lock to satisfy the longest applicable requirement. Lifecycle deletion should occur only after that period has expired and any legal hold or investigation-related preservation requirement has been cleared.
Personal data inside logs
Logs often contain usernames, email addresses, and full names. IP addresses may also identify an individual when combined with other information. Treat logs as potentially containing personal data, even when their primary purpose is security monitoring.
- Localization: Part 5 of Article 18 of Federal Law No. 152-FZ establishes requirements for the recording, systematization, accumulation, storage, clarification, and retrieval of personal data of Russian citizens using databases located in Russia, subject to the law’s scope and exceptions. A foreign log archive may therefore create compliance issues if it contains covered personal data.
- Data minimization: Avoid recording request bodies, passwords, access tokens, passport details, and other sensitive values unless there is a justified and controlled need.
- Masking and pseudonymization: When sharing a copy with an external SIEM provider, consider pseudonymizing selected fields while keeping the original records in a tightly controlled archive.
- Access control: Limit archive access to authorized security personnel. Reads of the archive should themselves be logged.
SIEM and Cloud Incident Investigation
When do you need a SIEM, and when is an archive with detection rules enough?
Russian SIEM options include MaxPatrol SIEM, KUMA, RuSIEM, and Security Vision. Open-source alternatives include Wazuh and OpenSearch with Sigma rules. Choose a platform based on actual EPS volume, the availability of parsers for your log sources, and whether you have people who can investigate alerts. Deploying a SIEM without the resources to review and act on alerts will not solve the underlying security problem.
For an organization with roughly 100–200 VMs and no dedicated security team, an S3 archive, around 20 detection rules running through Vector or Wazuh, and a query engine may be sufficient for many investigation tasks. ClickHouse, Trino, or DuckDB can query Parquet files directly from the bucket. Investigators can load the relevant time range and run SQL queries without keeping the entire historical dataset in a costly index.
If you need continuous monitoring but do not have in-house security specialists, a managed Security Operations Center (SOC) can provide monitoring and investigation support.
Cloud scenarios: from the first alert to the incident timeline
The following scenarios map common cloud incidents to MITRE ATT&CK techniques:
- Compromised access key (T1078.004). An
actor.key_idappears with a newclient.iporuser_agent, or API calls occur outside the account’s usual activity window. First establish which operations the key performed from the earliest suspicious event. - Privilege escalation (T1098). A role is changed by an actor whose identifier matches the affected resource. Look for related events, such as MFA being disabled and a new access key being created.
- Mass VM and snapshot deletion (T1485, T1490). Trigger a rule when a single actor deletes more than a defined number of resources within ten minutes.
- Data exfiltration from a bucket (T1530). A spike in
GetObjectrequests from a new IP may indicate unauthorized access. Without bucket-access logs, it may be impossible to reconstruct the incident reliably. - Logging disabled (T1562.008). Treat attempts to disable or weaken logging as a highest-priority alert.
Build the incident timeline in a single table using UTC timestamps:
| Time (UTC) | Source | Actor | Action | Resource | Result | Interpretation |
|---|---|---|---|---|---|---|
| 02:03:11 | Cloud API |
sa-backup-01
|
Create access key |
sa-backup-01
|
Success | New key created from an external IP |
| 02:09:40 | Cloud API |
sa-backup-01
|
Assign role |
sa-backup-01
|
Success | Privilege escalation |
| 02:17:43 | Cloud API |
sa-backup-01
|
Delete snapshot |
snap-4412
|
Success | Recovery points being destroyed |
| 02:18:05 |
auditd, erp-db-01
|
root
|
Stop service |
postgresql
|
Success | Possible preparation for encryption |
During containment, revoke the compromised actor’s keys and sessions first, then close the relevant management paths before proceeding with VM-level response. Run a tabletop exercise every quarter: simulate an alert, verify that the events reach the archive, and confirm that investigators can retrieve the required S3 data within a reasonable time.
Key Takeaways
Cloud audit logs are useful only when the entire pipeline works. Provider API logs must be exported, agents need disk buffers, events should carry both event and ingestion timestamps, and missing data sources must trigger alerts. S3 storage with Object Lock, write-only collection credentials, and a verifiable hash chain can preserve evidence for investigations and compliance at a lower cost than keeping the entire history in a high-performance index.
A SIEM is valuable when the organization has the event volume, detection rules, and people needed to act on alerts. In other environments, an S3 archive, a query engine, a focused set of rules, and a managed SOC may be a more practical approach.
Retention must follow the applicable requirements: three months is a reference point in some FSTEC guidance, while PCI DSS requires 12 months of audit logs with the latest three months immediately available. Personal data within logs requires careful minimization, access control, and assessment of Russian localization obligations.
A well-designed cloud logging pipeline helps answer auditors’ questions and reconstruct an attack using the same reliable set of events.