Date:
Category:
DevOps Strategy
Cloud Log Management on AWS: What to Collect, Where to Keep It

Written by
Dino Starcic
·
CEO

Cloud log management means collecting logs from your cloud services and applications, centralizing them, keeping them for a set period and making them searchable, so you can fix incidents, investigate security events and pass audits. On AWS the routine is clear: turn on the core log sources, send them to one place, structure them, set retention per log type, lock down access and watch volume. It is steady operational work that never quite ends, which is why many startups hand it to Cloudwise’s senior AWS and DevOps engineers as part of one monthly subscription.
CloudwiseKeep AWS Logs Secure and UsefulCloudwise’s senior AWS and DevOps engineers support log management, security monitoring and cost optimization through a monthly subscription.Visit
TL;DR
Start with CloudTrail, VPC Flow Logs and Route 53 Resolver query logs, then add load balancer, WAF, Config, GuardDuty, EKS and application logs based on what you need to answer.
Centralize logs from every account and Region in one place, with structured JSON and correlation IDs, so one request can be followed across services.
Set retention by log type. CloudTrail’s built-in event history covers only 90 days, so anything longer needs a trail or CloudTrail Lake.
Treat logs as sensitive data: encrypt them, restrict who can read and delete them, and never write secrets into them.
Log costs grow with volume. Review what you ingest, how long it stays searchable and who uses it, every month.
Table of Contents
What cloud log management actually covers
Which logs to collect first
How centralized logging works on AWS
Retention: how long to keep what
Keep logs secure
Control the cost of log data
How to evaluate a log management setup
Logs and monitoring work together
A 30-day plan for getting logging under control
Putting log management in the backlog
FAQ
Sources
What cloud log management actually covers
A log is a timestamped record that a system writes when something happens: a request arrives, a user signs in, a container crashes, an API call changes a setting. In the cloud, hundreds of these records per second come from dozens of services. Having them is not the same as managing them.
Managing logs means running them through a lifecycle. Logs are generated, collected and shipped, parsed into fields, stored, retained for a defined time, queried, and finally archived or deleted. Each stage has an owner and a rule. If no one decides the rule, the default applies, and defaults are rarely what an audit or an incident calls for.
Cloud log management serves three jobs:
Troubleshooting. Finding why a deployment failed or why latency spiked.
Security. Reconstructing who did what, from where and when.
Compliance. Proving that access and changes were recorded and retained.
AWS’s own guidance on centralized logging names these same areas: security and compliance, business operations and data analysis, and application and infrastructure troubleshooting are the core use cases for putting logs in one place.
Which logs to collect first
More logs are not automatically better. AWS recommends choosing log sources based on business use cases, and reviewing each service’s logging options, storage choices, retention and lifecycle behavior before you switch things on.
The same guidance names three basic sources for security investigations on AWS: CloudTrail, VPC Flow Logs and Route 53 Resolver query logs. It also lists Elastic Load Balancing, WAF, AWS Config, GuardDuty, EKS audit, EC2 operating system, application and RDS logs as further sources.
Here is a practical way to rank them:
Log source | What it tells you | Start here if |
|---|---|---|
CloudTrail | API activity: who called what, when, from which IP | Always. It is the audit trail of your account |
VPC Flow Logs | Network traffic to and from your VPC and instances | You need to see unexpected connections |
Route 53 Resolver query logs | DNS lookups made from your VPCs | You want to spot odd outbound lookups |
Load balancer and WAF logs | Requests reaching your applications, and what was blocked | You run public-facing services |
AWS Config and GuardDuty | Configuration changes and detected threats | You work toward audits or need alerting |
EKS audit, EC2 OS, application and RDS logs | What happens inside your workloads and databases | You troubleshoot performance and errors |
AWS’s threat detection material explains why the first two matter so much. CloudTrail records API-call history, including the time, caller identity, source IP and request parameters, while flow logs give visibility into traffic across your VPC and instances. Together they answer most first questions in an investigation: what changed, and what talked to what.
For a startup with one or two accounts, a sensible first week looks like this: CloudTrail enabled for all Regions, flow logs on production VPCs, load balancer logs on, and application logs from the services that carry customer traffic. Add the rest as questions arise.
How centralized logging works on AWS
Logs scattered across accounts and Regions are slow to search and easy to lose. The pattern AWS documents for enterprise scale is a good model, even if you build a smaller version of it.
In AWS Prescriptive Guidance, the flow runs like this:
Services such as EKS, Lambda and RDS write to Amazon CloudWatch Logs, the initial collection point.
Subscription filters forward only the selected logs.
Amazon Data Firehose processes and delivers them.
Amazon S3 stores them durably in regional buckets, ready for analysis.
Terraform makes the setup repeatable across accounts in AWS Organizations.
The last step matters more than it looks. When logging is defined as code, a new account gets the same collection, forwarding and storage rules as every other account on day one. When it is configured by hand, gaps appear the first time someone launches a service in a hurry.
Structure your logs before you ship them
Searching free text works until volume grows. AWS recommends JSON logging with standard timestamps and fields, consistent prefixes and correlation IDs to make tracking and analysis easier across centralized logs.
A correlation ID is a unique identifier attached to a request at the entry point and passed to every service it touches. With it, one search shows the full path of one customer request through your load balancer, API, queue and database. Without it, you match timestamps by eye at 2 a.m.
A minimal structured application log line should carry:
a standard timestamp in one time zone
a log level used consistently (error, warn, info)
the service name and version
the correlation or request ID
the message and a few useful fields, such as status code or duration
Retention: how long to keep what
Retention is where good intentions meet the bill. Keep everything forever and costs grow without limit. Keep too little and an audit or a slow-burn security incident finds a hole in the record.
One fact surprises many teams. AWS states that CloudTrail event history covers management events for 90 days by default. To keep events longer, or to capture data events, you need a trail delivering to S3 or CloudTrail Lake, which can retain CloudTrail logs for up to seven years.
A workable retention plan assigns each log type a tier:
Hot (days to weeks): application and load balancer logs you query daily for debugging.
Warm (months): security and access logs you need for investigations.
Archive (a year or more): audit trails kept to meet a compliance requirement, stored cheaply in S3.
Your compliance framework, customer contracts and legal counsel set the minimum periods. Set the number per log type, write it down, and apply it through lifecycle policies on the S3 buckets rather than through memory. AWS recommends versioning, lifecycle policies and cross-Region replication for log storage.
Data location is part of the decision too. If customers or regulations require data to stay in specific Regions, choose the regional buckets for your logs with that in mind from the start.

Keep logs secure
Logs hold some of your most revealing data: user identifiers, IP addresses, internal hostnames, error traces. They are also the evidence you rely on after a breach, which makes them a target. Attackers who gain access often try to delete or alter logs.
The AWS observability guidance on CloudWatch Logs recommends:
deletion protection, or an explicit deny on deletion, for critical log groups
MFA for privileged users
customer-managed KMS keys for sensitive log groups, with key-policy restrictions, rotation and monitoring (CloudWatch Logs already encrypts data at rest by default)
For the central archive, AWS Prescriptive Guidance adds KMS encryption, least-privilege access, CloudTrail monitoring of the bucket itself, key rotation, versioning and cross-Region replication.
The other half of log security is what you write into them. Never log passwords or password hashes, API keys, access tokens, session cookies, private keys, card or bank data, Social Security numbers, or unredacted request bodies. Once a secret lands in a searchable log, everyone with log access can read it, and it is copied into every archive. Fix this in code review and with redaction in the logging library, and treat any secret found in a log as exposed: rotate it.
If you are building out your wider AWS security baseline, the AWS security checklist for startups shows where logging fits next to IAM, encryption and monitoring.
Control the cost of log data
Log volume tends to grow faster than traffic. A verbose debug setting, a chatty health check or a new service with default logging can double ingestion in a month. Four habits keep the bill predictable:
Know your biggest sources. Review ingestion by log group or source monthly. A handful of groups usually account for most of the volume.
Filter at the source. Forward only what you will use. Subscription filters exist for this purpose, and sampling works for high-volume, low-value events such as routine health checks.
Tier by age. Keep recent data fast to search and move older data to cheaper storage.
Avoid duplicates. Sending the same event through two pipelines pays for it twice.
Budget for the people side as well. A log pipeline needs someone to maintain parsers, fix broken forwarding after a deployment change, tune alerts and answer questions. That effort is a real cost, and it is the one startups most often leave out of the estimate. Cost review is also a standing part of AWS cost optimization and FinOps work, where log storage and ingestion sit next to compute and data transfer.
How to evaluate a log management setup
Whether you stay on AWS-native services or add a dedicated logging platform, compare options on the same criteria and with the same inputs:
Billable unit. Is the price per gigabyte ingested, per gigabyte stored, per query, or per host? The unit changes how cost grows.
Ingest volume and growth. Model your current volume and a realistic 12-month projection, not today’s number alone.
Retention tiers. What do hot, warm and archive storage cost, and how long does it take to search archived data?
Pipeline work. Who writes and maintains parsing, filtering and routing?
Query speed. Can you search a day of logs during an incident without waiting?
Access control and encryption. Does it support the role separation and key management described above?
Correlation. Can you connect logs to metrics and traces for the same service?
Operating effort. Who is on call for the pipeline itself?
Run your real log volume through any option before you commit. A headline rate says little until it meets your ingestion, retention and query habits.
Logs and monitoring work together
Logs tell you what happened. Metrics tell you that something is happening, and alerts tell a person to look. A strong setup connects all three: an alert fires on error rate, the on-call engineer jumps to the logs for that service and time window, and the correlation ID leads to the failing request. Our guide to AWS monitoring best practices covers what to track on the metrics side so your logs are the second step rather than the first.
Logs also feed compliance. Auditors typically ask for evidence that access and changes were recorded, that records were retained for the required period and that only authorized people could alter them. Clean, centralized, access-controlled logs make that evidence quick to produce, and it is the foundation of compliance and audit readiness.
A 30-day plan for getting logging under control
If your logging grew by accident, this order works without stalling product work:
Week 1: Inventory. List accounts, Regions and which services log where. Confirm CloudTrail is on in all Regions and delivering to S3.
Week 2: Centralize. Create the central bucket or log account, with encryption, versioning and restricted access. Forward CloudTrail, flow logs and load balancer logs into it.
Week 3: Structure. Move application logs to JSON with consistent fields and correlation IDs. Remove secrets and personal data from log output.
Week 4: Govern. Set retention per log type, add lifecycle rules, create alerts for log-pipeline failures and for deletion attempts on log groups, and schedule a monthly volume and cost review.
Each of these is a small, well-defined task. That shape suits a backlog, which is how Cloudwise works.
Putting log management in the backlog
Cloudwise gives startups and product teams senior AWS and DevOps engineers under one subscription. Tasks go into a shared backlog that you prioritize, with a typical response time of 24 to 48 hours, no hourly billing and no long-term contracts. Setting up centralized logging, tightening log access, building dashboards and alerts, and reviewing log costs are the kind of recurring work that sits naturally alongside our monitoring and observability and AWS infrastructure management services.
The Simplest Subscription is $7,499 per month, and you can cancel anytime. See the pricing page for what is included.

If you want the log pipeline built, secured and kept tidy without hiring a full DevOps team, start with the Cloudwise subscription and put the 30-day plan above into your backlog as your first tasks.
Sources
SEC04-BP01 Configure service and application logging, AWS Well-Architected Framework
Centralized Logging with OpenSearch implementation guide, AWS
CloudWatch Logs security best practices, AWS Observability Best Practices
How to Build a Threat Detection Strategy in Amazon Web Services
Recommended
Questions Answered
Frequently asked questions
Clear answers to common questions about our AWS & DevOps subscription and how it works.