Prompt
What should I use for log retention and compliance in the cloud?
Latest observation
Oct 28, 2026
OpenAI APIWeb search: off
For log retention and compliance in the cloud, the best choice is usually a centralized, immutable log archival system with policy-based retention and audit controls.
Good default approach
Use:
- Cloud-native logging service for collection
- Object storage with immutability / WORM for long-term retention
- Lifecycle policies for automatic expiration
- Encryption, access control, and audit trails for compliance
Common cloud options
- AWS: CloudTrail + CloudWatch Logs + S3 Object Lock
- Azure: Azure Monitor / Log Analytics + Storage immutable blobs
- GCP: Cloud Logging + Cloud Storage retention policies / bucket lock
What to look for
A compliant solution should support:
- Tamper resistance / immutability
- Retention locks
- Encryption at rest and in transit
- Fine-grained access controls
- Searchable access for audits
- Export to long-term archive
- Regional/data residency controls
- Automated deletion after retention period
Practical recommendation
If you want a general architecture:
- Send logs to a central log platform
- Stream copies to immutable object storage
- Set retention by log type
- security logs: 1–7 years depending on regulation
- app logs: shorter, e.g. 30–90 days
- audit logs: longer retention
- Restrict deletion with legal hold / retention lock
- Periodically test restore and retrieval
Compliance note
Exact retention requirements depend on your industry and regulations, such as:
- SOC 2
- ISO 27001
- HIPAA
- PCI DSS
- GDPR
- SOX
- local data retention laws
If you want, I can give you a cloud-specific recommendation for AWS, Azure, or GCP or a retention policy template.