A Field Guide to AWS Logs: What Exists and Where It Lives
Where is that log? You are in the middle of an incident, and someone asks, "Where are the network logs for that time?" If you could not answer right away, you are not alone. Every AWS service handles logs a little diff
Where is that log?
You are in the middle of an incident, and someone asks, "Where are the network logs for that time?" If you could not answer right away, you are not alone. Every AWS service handles logs a little differently, and they end up in different places.
This guide sorts AWS logs by what you use them for. For the main ones, it explains how they work and where they are stored.
This guide is current as of December 2026. I checked the facts against the official documentation and turned on the main logs in a test AWS account. When I say "in my test," I mean I ran it myself. Prices are for the Asia Pacific (Tokyo) Region.
Words used in this guide
These terms come up again and again. Come back here if one of them is unclear.
- A Region is a geographic area where AWS runs data centers. Tokyo is ap-northeast-1, and N. Virginia is us-east-1.
- An API is how programs talk to AWS. Even clicks in the AWS console call an API behind the scenes.
- IAM (AWS Identity and Access Management) is the service that controls who and what can do things in your AWS account.
- An ARN is a name that points to exactly one AWS resource. It includes the Region and the account ID.
Three more terms:
- A VPC (Amazon Virtual Private Cloud) is your own private network inside AWS.
- Amazon CloudWatch Logs is the service that collects, stores, and searches logs.
- Amazon S3 is the service that stores files. People often use it to keep logs for a long time.
Other services get a short explanation the first time they appear.
Three things to know before you look for a log
Three traits apply to almost every log on AWS. Knowing them saves time later.
Most logs are off until you turn them on
Some AWS logs are recorded with no setup. Most are not. If a log was off, you cannot go back and see what happened before you turned it on.
These logs are recorded without any setup:
- AWS CloudTrail event history, for the last 90 days
- AWS Lambda function logs
These are some of the logs you must turn on yourself:
- CloudTrail trails, VPC Flow Logs, and S3 server access logs
- Access logs for Elastic Load Balancing and Amazon CloudFront
- AWS WAF logs and Amazon Route 53 query logs
- Amazon RDS slow query logs, Amazon EKS control plane logs, and Amazon Bedrock model invocation logs
In the Tokyo Region of my test account, none of these were set up: a CloudTrail trail, VPC Flow Logs, AWS Config, or Amazon GuardDuty. If something had happened in that state, the only record of AWS actions would have been 90 days of CloudTrail event history.
Logs go to one of four places
- CloudWatch Logs is for logs you want to search right away. Logs Insights can search across many log groups at once.
- Amazon S3 is for logs you want to keep for a long time at low cost. Amazon Athena can query them with SQL.
- Amazon Data Firehose is a pipe that streams logs to other analytics services or outside tools.
- Some logs stay inside the service, like CloudTrail event history. You read them only through that service's console or API.
AWS calls logs that a service sends on your behalf "vended logs." VPC Flow Logs and AWS WAF logs are examples.
- Vended logs use tiered pricing, so the price per GB drops as volume grows.
- Even when they go straight to S3, CloudWatch delivery charges still apply.
- Newer services use "log delivery," where you create a delivery source and a delivery destination and then connect them. CloudFront standard logging (v2) works this way.
Some logs land in N. Virginia
This is the main point of the guide. Services like IAM and Route 53 do not belong to any one Region. They are called global services.
Their logs are often recorded in US East (N. Virginia), us-east-1, or the setup requires you to put the destination there.
CloudTrail records these in us-east-1:
- IAM, AWS STS (global endpoint), and CloudFront events show up as us-east-1 events. This has been true since November 22, 2021. Some can show up in us-east-2 or us-west-2.
- AWS Organizations events can be viewed only in us-east-1.
- Console sign-in events (ConsoleLogin) for the root user land in us-east-1, us-east-2, or us-west-2. IAM users who sign in through the global endpoint land in us-east-1, with some exceptions.
These logs must be set up in us-east-1:
- Route 53 public hosted zone query logs need a log group in us-east-1.
- AWS WAF logs for CloudFront go to us-east-1, because the web ACL lives there.
- CloudFront standard logging (v2) is configured through the us-east-1 API. A Firehose destination must also be in us-east-1.
- AWS Shield Advanced attack flow logs are set up and viewed in us-east-1.
These cost and health records are in us-east-1:
- AWS Health global events reach only Amazon EventBridge rules in us-east-1.
- The billing metric EstimatedCharges is stored only in us-east-1.
- The AWS Data Exports API (CUR 2.0) has an endpoint only in us-east-1.
There is one exception. AWS Global Accelerator is managed from US West (Oregon), so you set up its flow logs in us-west-2.
I checked this in three places. The first was CloudTrail. I created an IAM role with the AWS CLI (the command-line tool for AWS) set to Tokyo. The event showed up only in the us-east-1 event history.
-- ap-northeast-1
(no events)
-- us-east-1
2026-12-05T10:19:18+09:00 CreateRole logbook-verify-flowlogs-role
The second was Route 53 public hosted zone query logging. When I pointed it at a log group in Tokyo, the request failed with this error.
An error occurred (InvalidInput) when calling the CreateQueryLoggingConfig operation:
The ARN for the CloudWatch Logs log group is invalid.
The third was AWS WAF for CloudFront. Sending its logs to a Tokyo log group also failed with an invalid ARN error.
An error occurred (WAFInvalidParameterException) when calling the PutLoggingConfiguration operation:
Error reason: The ARN isn't valid. ... field: LOG_DESTINATION
Both worked as soon as I switched to a log group in us-east-1. The errors never mention the Region. They only say the ARN is invalid. If you see that error while setting up logs for a global service, check the destination's Region first.
CloudWatch Logs basics
Many logs end up in CloudWatch Logs, so it helps to know how it is organized.
Log groups and log streams
CloudWatch Logs uses three levels.
- A log event is one line of log: a timestamp and a message.
- A log stream is a sequence of log events from one source. A Lambda function gets one stream per execution environment.
- A log group holds log streams. You set retention and access control on the log group.
Log groups that AWS services create for you start with /aws/, such as /aws/lambda/.
Retention defaults to forever
When you create a log group, retention is set to "Never expire." You can pick one of 22 settings, from 1 day to 10 years.
In my test account, about 80 percent of log groups in Tokyo and N. Virginia had no expiry.
- Tokyo had 139 log groups, and 110 of them never expire.
- N. Virginia had 95 log groups, and 80 of them never expire.
- Of those 190, 145 belonged to Lambda and Amazon Bedrock AgentCore.
Storage costs only $0.033 per GB per month. Still, if you never set retention, logs pile up forever.
Three log classes
You choose a log class when you create a log group. You cannot change it later.
- Standard supports every feature. Ingestion costs $0.76 per GB.
- Essentials (formerly Infrequent Access) costs half as much to ingest. Some features are missing, and you read logs with Logs Insights.
- Delivery is only for sending Lambda logs to S3 or Firehose. Retention is fixed at 2 days.
Infrequent Access was renamed Essentials. In my test, the API accepted either name and created the log group with the name I gave.
Getting logs out
- Logs Insights searches and aggregates across log groups. You pay for the data it scans.
- Live Tail streams logs as they arrive. You pay by the minute.
- Subscription filters keep sending new logs to targets like Lambda or Data Firehose.
- Export to S3 is a one-time copy. For ongoing storage, AWS recommends subscription filters instead.
You can also see logs from several AWS accounts in one place. One way lets an account read another account's logs in the same Region. The other copies logs to a different account or Region.
AWS logs by purpose
Here is the catalog. It is split into nine groups by what you use the logs for. "Off by default" means you have to turn the log on.
1. Who did what
These logs record actions in AWS. They are the first place to look during an investigation or an audit.
- CloudTrail event history shows the last 90 days of AWS actions such as create, change, and delete. It is on by default and free.
- A CloudTrail trail keeps those actions for the long term. It is off by default and writes to S3, with CloudWatch Logs and EventBridge as options.
- CloudTrail data events record actions on data, such as reading S3 objects or invoking Lambda. They are off by default.
- CloudTrail network activity events record API calls through VPC endpoints. They are off by default.
Other CloudTrail features and related services:
- CloudTrail Insights flags unusual API call volume or error rates. It is off by default.
- CloudTrail Lake stores events in a form you can query with SQL, for up to 10 years.
- AWS Config records resource settings and their history. It is off by default and delivers to S3 every 6 hours.
- AWS KMS and Secrets Manager have no logs of their own. Their use is recorded in CloudTrail.
CloudTrail
CloudTrail records AWS API calls. It tells you who did what, and when.
It has four event types. Only management events are recorded by default.
- Management events are changes to AWS settings, such as creating, changing, or deleting resources.
- Data events are actions on the data inside a resource, such as reading or writing S3 objects.
- Network activity events are calls that pass through VPC endpoints, the private entry points from a VPC to AWS services.
- Insights events flag sudden changes in API call volume or error rate.
Event history shows 90 days of management events with no setup. It is shown per Region, and anything older than 90 days is gone.
To keep events longer, create a trail and store the logs in S3. Watch the Region scope. A trail created with the CLI or API covers only one Region by default.
In my test, I created two trails with Tokyo as the home Region:
- One covered all Regions, and the other covered only Tokyo.
- Both were set to include global service events.
- After creating them, I made changes in IAM, Route 53, and AWS WAF, then counted the events that reached S3.
The all-Regions trail created folders for ap-northeast-1, ap-northeast-2, eu-west-2, and us-east-1. The us-east-1 folder held 17 IAM events, 7 Route 53 events, and 3 AWS WAF events.
The Tokyo-only trail created only an ap-northeast-1 folder. It received no IAM events at all, even though it was set to include global service events.
The 17 IAM events were reads of roles by AWS services such as Resource Explorer. The role I created right after logging started did not appear in either trail.
Your S3 bucket (a storage container in S3) can be in Tokyo, but the folders inside are split by the Region that recorded each event. Files arrive about every 5 minutes.
bucket/prefix/AWSLogs/<account-id>/CloudTrail/<region>/YYYY/MM/DD/
The first trail that delivers management events to S3 is free, apart from S3 storage. Data events cost $0.10 per 100,000 events and add up fast, so turn them on only for what you need.
AWS KMS (the key management service) records encrypt and decrypt calls as management events. There are a lot of them, so you can exclude them per trail.
AWS Config
AWS Config records how a resource's settings changed over time. CloudTrail tells you who made a change. Config tells you what the resource looked like afterward.
- Configuration history reaches S3 every 6 hours for each resource type.
- Config also keeps its records internally for 7 years by default.
- For global resources like IAM, AWS recommends recording in only one Region to avoid duplicates.
Global resource types added from February 2022 onward, such as Route 53, CloudFront, and AWS WAF, are recorded only in us-east-1.
2. Spotting attacks and anomalies
These are not raw logs. They are findings that AWS produces by analyzing logs. You turn each service on to use it.
- Amazon GuardDuty detects suspicious traffic and activity. Findings are kept for 90 days and can go to EventBridge or S3 (S3 needs a KMS key).
- AWS Security Hub CSPM collects configuration checks and findings from other services. Active findings stay 90 days and archived ones 30 days.
- The new AWS Security Hub collects findings in OCSF, a common format for security logs.
- Amazon Detective gathers related data for investigating findings and keeps it for up to a year.
These look for specific risks, or gather logs for analysis:
- Amazon Macie finds sensitive data such as personal information in S3. Findings stay 90 days.
- Amazon Inspector finds software vulnerabilities. Findings stay until they are fixed, and you can export them to S3 as CSV or JSON.
- IAM Access Analyzer finds resources shared outside your account and unused permissions.
- Amazon Security Lake converts many log types to OCSF and stores them in your S3 bucket.
GuardDuty reads CloudTrail, VPC Flow Logs, and DNS logs through its own feed, separate from your settings. You do not need to turn those logs on for GuardDuty.
GuardDuty also discards those logs after analysis, and you cannot read them. Turn on any logs you want to examine yourself.
The original AWS Security Hub has been renamed AWS Security Hub CSPM. The new AWS Security Hub, generally available since December 2025, is a separate service.
3. Network traffic
These logs record traffic in and out of your VPC, plus name lookups (DNS).
- VPC Flow Logs record source, destination, port, and whether traffic was accepted or rejected. They are off by default and go to CloudWatch Logs, S3, or Firehose.
- AWS Transit Gateway flow logs record traffic through a Transit Gateway, the hub that connects many VPCs.
- Route 53 Resolver query logs record DNS queries made from inside a VPC. They must be in the same Region as the VPC.
- Route 53 DNS Firewall verdicts (block or alert) appear inside Resolver query logs.
Public DNS, firewalls, and private connections:
- Route 53 public DNS query logs record queries from the internet to your domain. They go only to CloudWatch Logs, and only in us-east-1.
- AWS Network Firewall logs flows, rule alerts, and TLS activity.
- AWS Client VPN connection logs record VPN connects and disconnects. AWS Site-to-Site VPN logs record the state of tunnels to your sites.
- Amazon VPC Lattice access logs and AWS Verified Access logs record requests to services and access attempts to internal apps without a VPN.
A few network services work differently:
- AWS Global Accelerator flow logs go only to S3, and you set them up in us-west-2.
- NAT gateways have no logs of their own. Put VPC Flow Logs on the NAT gateway instead.
- AWS Direct Connect has no traffic logs. You get metrics and CloudTrail.
VPC Flow Logs
VPC Flow Logs record traffic through an elastic network interface (ENI), the network connection point of a server or other resource. They record volume per source and destination pair, not the contents of the traffic.
In my test, I turned on flow logs in a test VPC and sent HTTPS traffic from an Amazon EC2 instance (a virtual server). Here are four lines from the first file that reached S3.
version account-id interface-id srcaddr dstaddr srcport dstport protocol packets bytes start end action log-status
2 <acct> eni-00879443b74b53597 18.65.168.66 10.99.0.85 443 50620 6 352 484922 1796433666 1796433676 ACCEPT OK
2 <acct> eni-00879443b74b53597 10.99.0.85 18.65.168.66 50620 443 6 70 4505 1796433666 1796433676 ACCEPT OK
2 <acct> eni-00879443b74b53597 85.217.140.9 10.99.0.85 51995 2332 6 1 52 1796433666 1796433676 REJECT OK
The first line lists the field names, and I hid the account ID. Lines 2 and 3 are the two directions of one HTTPS connection with an outside server. Each direction gets its own line.
Line 4 is a connection from the internet to port 2332 that was rejected. In that first file, 31 of the 95 lines were rejected connections like this.
Files reach S3 compressed, at this path. When I sent flow logs to CloudWatch Logs, it created one log stream per ENI.
bucket/prefix/AWSLogs/<account-id>/vpcflowlogs/<region>/YYYY/MM/DD/
You can add fields such as the VPC ID or traffic direction. You cannot change a flow log after you create it, so to add fields you create a new one.
Queries to the AWS DNS server and traffic to instance metadata (169.254.169.254) are not recorded. For DNS, use Resolver query logs, covered next.
Two kinds of Route 53 query logs
Route 53 has two query logs with similar names. They record different queries and live in different places.
- Resolver query logs record queries made by servers inside your VPC. Public DNS query logs record queries from the internet to your domain.
- Resolver query logs help you investigate suspicious destinations and internal name lookups. Public DNS query logs show where your domain is being looked up from.
- Resolver query logs go to CloudWatch Logs, S3, or Firehose. Public DNS query logs go only to CloudWatch Logs.
- Resolver query logs live in the VPC's Region. Public DNS query logs live in us-east-1.
In my test, I turned on both and sent some queries. A Resolver query log records each query as one JSON object (I hid the account ID).
{"version": "1.100000", "account_id": "<acct>", "region": "ap-northeast-1",
"vpc_id": "vpc-088821ee68122e475", "query_timestamp": "2026-12-05T01:29:28Z",
"query_name": "lbv1.example.com.", "query_type": "AAAA", "query_class": "IN",
"rcode": "NOERROR", "answers": [], "srcaddr": "10.99.0.89", "srcport": "37182",
"transport": "UDP", "srcids": {"instance": "i-0a63aa8edc85abf01"}}
It includes the ID of the EC2 instance that asked, so you can trace which server looked up which name.
Public DNS query logs arrived in a us-east-1 log group as one line of text per query. I sent the queries from my own PC directly to the zone's name servers, so the two hidden fields would show my own network.
1.0 2026-12-05T01:29:21Z Z0905502JFQAV8U9C590 www.logbook-verify-20261205.com A NOERROR UDP <edge> <client-ip> -
1.0 2026-12-05T01:29:21Z Z0905502JFQAV8U9C590 a9330.logbook-verify-20261205.com A NXDOMAIN UDP <edge> <client-ip> -
After the timestamp come the hosted zone ID, the queried name, the record type, and the response code. Then come the edge location that answered and the address the query came from.
Normal lookups go through a DNS resolver (a server that relays queries), and answers from its cache never reach this log. So the log shows fewer lookups than your real traffic.
4. Front doors and the edge
These are logs from the services that receive user requests: load balancers, the CDN, WAF, and API endpoints. They tell you which request got which response.
- Application Load Balancer (ALB) access logs record the status code and processing time of each request. Connection logs record TLS connections and client certificates, and health check logs record check results and failure reasons.
- Network Load Balancer (NLB) access logs cover only TLS connections on TLS listeners.
- Classic Load Balancer access logs go to S3, every 60 minutes by default.
- Gateway Load Balancer has no access logs. Use VPC Flow Logs instead.
CloudFront, WAF, and Shield:
- CloudFront standard logging (v2) records each request, with the fields and format you choose. It goes to CloudWatch Logs, S3, or Firehose.
- CloudFront legacy standard logs go only to S3. CloudFront real-time logs reach Amazon Kinesis Data Streams within seconds.
- AWS WAF logs record the requests WAF inspected and its verdicts. Logs for CloudFront go to us-east-1.
- Shield Advanced attack flow logs record traffic to resources under DDoS protection, in us-east-1.
API Gateway has two logs:
- API Gateway execution logs record the details of how an API handled a request.
- API Gateway access logs record each request in a format you define.
Elastic Load Balancing access logs
For an ALB, the standard approach writes access logs to S3 every 5 minutes. The bucket must be in the same Region as the ALB, and you pay only for S3 storage.
A newer option sends them to CloudWatch Logs or Firehose instead. That option uses vended logs pricing.
CloudFront's three kinds of logs
The main CloudFront log is standard logging (v2). CloudFront is the AWS CDN, which serves content from locations around the world. You choose which fields to include and the output format.
- You call the configuration API in us-east-1, whatever the destination.
- A Firehose destination must also be in us-east-1. An S3 bucket can be in Tokyo.
- For a CloudWatch Logs destination, the official documentation does not say which Region the log group must be in, and I could not confirm it.
Standard logs usually arrive within an hour. If you need them faster, real-time logs arrive within seconds.
Where AWS WAF logs go
AWS WAF protects web apps from attacks. The name of its log destination must start with "aws-waf-logs-", whether it is a log group or an S3 bucket.
The log group must be in the same Region as the web ACL (the WAF configuration), so it is us-east-1 for CloudFront. You can redact fields you do not want to keep.
5. Applications and compute
These logs come from your application output and from the servers and containers it runs on.
- EC2 operating system and application logs reach CloudWatch Logs once you install and configure the CloudWatch agent.
- EC2 console output (what the instance printed at boot) is available through the API.
- Lambda function logs go to /aws/lambda/ automatically if the execution role allows it.
- Amazon ECS and AWS Fargate container logs go where the task definition says, through the awslogs driver or FireLens.
Kubernetes and app platforms:
- EKS control plane logs come in five types, all off by default, in /aws/eks//cluster.
- EKS node and pod logs need a tool such as Fluent Bit that you run yourself.
- AWS Elastic Beanstalk sends instance logs to /aws/elasticbeanstalk// once you turn it on.
- AWS App Runner sends logs to /aws/apprunner/ automatically. It no longer accepts new customers.
Batch jobs, workflows, events, and GraphQL:
- AWS Batch uses the awslogs driver and writes to /aws/batch/job.
- AWS Step Functions execution history is off by default. AWS recommends a log group under /aws/vendedlogs/states/.
- EventBridge event bus logs record events received and delivered. They are off by default.
- AWS AppSync logs GraphQL requests to /aws/appsync/apis/ once you turn it on.
Sign-in, server operations, IoT, and builds:
- Amazon Cognito user activity logs need the Plus plan with threat protection.
- Session Manager logs the commands run in sessions to S3 or CloudWatch Logs. Run Command returns only the first 24,000 characters of output unless you send it to /aws/ssm/.
- AWS IoT Core logs device traffic and rule processing to AWSIotLogsV2.
- AWS CodeBuild writes build output to CloudWatch Logs by default. AWS CodePipeline writes Commands action output to /aws/codepipeline/.
Deployment and hosting:
- AWS CodeDeploy writes to /var/log/aws/codedeploy-agent/ on the server.
- AWS Amplify Hosting access logs are downloaded from the console as CSV, two weeks at a time.
Lambda logs
Lambda runs your code without servers to manage. It sends logs automatically. In my test, one invocation created a log group set to never expire.
The default text format mixes Lambda's own START, END, and REPORT lines with your function's output.
INIT_START Runtime Version: python:3.13.mainlinev2.v86 ...
START RequestId: e7b86810-... Version: $LATEST
plain print line
[INFO] 2026-12-05T01:19:35.548Z e7b86810-... info via logging: {"hello": "logbook"}
END RequestId: e7b86810-...
REPORT RequestId: e7b86810-... Duration: 1.83 ms Billed Duration: 78 ms Memory Size: 128 MB Max Memory Used: 31 MB Init Duration: 75.58 ms
When I switched the log format to JSON, Lambda's own lines and lines from the logging module became JSON. Filtering by log level works only in JSON format.
{"time":"2026-12-05T01:20:03.176Z","type":"platform.start","record":{"requestId":"32885d58-...","version":"$LATEST"}}
plain print line
{"timestamp": "2026-12-05T01:20:03Z", "level": "INFO", "message": "info via logging: {\"hello\": \"json\"}", "logger": "root", "requestId": "32885d58-..."}
{"time":"2026-12-05T01:20:03.188Z","type":"platform.report","record":{"requestId":"32885d58-...","metrics":{"durationMs":11.245,"billedDurationMs":81,...},"status":"success"}}
Lines from print stayed plain text even in JSON format. If you want to aggregate by field in Logs Insights, write logs through the logging module.
You can change the destination log group and share one across functions. With the Delivery log class, Lambda can also send logs to S3 or Firehose.
ECS container output
In ECS, the container service, the task definition decides where container output goes. With awslogs it goes to CloudWatch Logs. With FireLens it can also go to S3 and other places.
Since June 2025, awslogs no longer waits for logs to be sent by default. If its buffer (10 MB by default) fills up, the overflow is lost.
EKS control plane and nodes
EKS runs Kubernetes. Its control plane logs and your application logs are separate. The control plane has five log types, all off by default.
The audit log records actions against the Kubernetes API. Node and pod logs you send yourself.
6. Databases and storage
These logs record reads and writes, and what happens inside your databases.
- S3 server access logs record requests to a bucket, including failed authentication. They are off by default.
- CloudTrail data events for S3 record object-level API calls. They are off by default.
- RDS for MySQL has error, slow query, general, and audit logs, kept on the instance for 2 weeks.
- RDS for PostgreSQL has postgresql, upgrade, and IAM authentication error logs, kept on the instance for 3 days by default.
Other database engines and database monitoring:
- RDS for Oracle has alert, audit, trace, and listener logs. RDS for SQL Server has error and agent logs.
- Amazon Aurora has error, slow query, general, and audit logs in /aws/rds/cluster//.
- Database Activity Streams send database activity to Kinesis Data Streams for auditing.
- RDS Enhanced Monitoring writes operating system metrics as JSON to RDSOSMetrics, kept 30 days by default.
NoSQL, data warehouse, search, and cache services:
- Amazon DynamoDB has no logs of its own. Use CloudTrail, with data events for item-level actions.
- Amazon Redshift audit logs record connections, users, and activity to S3 or CloudWatch Logs.
- Amazon OpenSearch Service has error, slow, and audit logs. Amazon ElastiCache has slow and engine logs.
- Amazon DocumentDB and Amazon Neptune write audit and other logs under /aws/docdb/ and /aws/neptune/.
Two ways to log S3 access
There are two ways to record S3 access. The official documentation recommends CloudTrail data events, which arrive in about 5 minutes.
Server access logs can take hours to arrive, and records are occasionally missing or duplicated. Even so, some requests, such as failed authentication, appear only in server access logs.
- The destination bucket must be in the same Region and the same account as the source bucket.
- Delivery straight to S3 is free. You pay only for storage.
- To collect logs across Regions or accounts, use the newer delivery to CloudWatch Logs.
In my test, I tried to send logs from a Tokyo bucket to a bucket in us-east-1. S3 rejected it.
An error occurred (CrossLocationLoggingProhibitted) when calling the PutBucketLogging operation:
Cross S3 location logging not allowed.
The setup worked with a bucket in the same Region. The first log file arrived about 50 minutes after my requests.
<owner-id> logbook-verify-<acct>-src [05/Dec/2026:01:23:47 +0000] <client-ip> arn:aws:iam::<acct>:user/<iam-user> RMQB32KTHJXPEEWR REST.GET.OBJECT obj2.txt "GET /obj2.txt HTTP/1.1" 206 - 6 6 21 20 "-" "aws-cli/2.42.3 ..." - <host-id> SigV4 ECDHE-RSA-AES128-SHA AuthHeader logbook-verify-<acct>-src.s3.ap-northeast-1.amazonaws.com TLSv1.2 - - -
Each line is one request. It shows who made it (the IAM ARN), the operation, the object, and the result (206 here). I hid my own network address and other identifiers.
The record of an unauthenticated GET that was denied arrived in a separate file about an hour later. The requester field is "-".
<owner-id> logbook-verify-<acct>-src [05/Dec/2026:01:23:48 +0000] <client-ip> - ECK2603C1JKY5ZQX REST.GET.OBJECT obj1.txt "GET /obj1.txt HTTP/1.1" 403 AccessDenied 263 - 19 - "-" "curl/8.14.1" - <host-id> - TLS_AES_128_GCM_SHA256 - logbook-verify-<acct>-src.s3.ap-northeast-1.amazonaws.com TLSv1.3 - - -
When I stopped checking, about an hour in, records had arrived for only 3 of the 7 requests I sent.
RDS and Aurora logs
RDS is the managed relational database service. Its logs are first written on the database server and deleted after a set period. For RDS for PostgreSQL, the default is 3 days.
To keep them longer, turn on export to CloudWatch Logs. Those log groups also never expire by default.
In RDS for MySQL, logs such as the slow query log are off by default. Even when you turn them on, they go to tables inside the database by default. To send them to CloudWatch Logs, set log_output to FILE in the parameter group (the set of database settings).
7. Data movement and analytics
These are logs from services that move data around and from analytics services. Many of them have no logs of their own.
- Amazon MSK broker logs go to CloudWatch Logs, S3, or Firehose. Amazon MQ writes general and audit logs under /aws/amazonmq/broker/.
- Kinesis Data Streams and Amazon SQS have no logs of their own. Record reads and writes with CloudTrail data events.
- Data Firehose writes delivery errors to /aws/kinesisfirehose/.
- Amazon SNS delivery status logs record whether each notification was delivered.
Email, ETL, queries, and file transfer:
- Amazon SES publishes sending, delivery, and bounce events to destinations you set in a configuration set.
- AWS Glue writes job output and errors to /aws-glue/jobs/output and /aws-glue/jobs/error. Amazon EMR writes node logs to S3.
- Amazon Athena keeps query history inside the service for 45 days. AWS Lake Formation records data access grants in CloudTrail.
- AWS Transfer Family writes JSON logs to /aws/transfer/. AWS DataSync writes to /aws/datasync.
Backup and migration:
- AWS Backup has no logs of its own and is recorded in CloudTrail. AWS DMS writes migration task logs to dms-tasks-.
8. AI and machine learning
These logs come from generative AI and machine learning services. Some contain the full text of prompts and responses.
- Amazon Bedrock model invocation logs record prompts, responses, and the calling IAM identity. They are off by default.
- Amazon Bedrock AgentCore writes agent logs and traces. Runtime creates its log group automatically.
- Amazon SageMaker AI writes training and inference logs to log groups such as /aws/sagemaker/TrainingJobs.
- Amazon Q Developer prompt logs go to S3 in the same Region.
Bedrock model invocation logs
Amazon Bedrock is the service for using generative AI models through an API. Its model invocation logs are off by default. My test account had none set up in Tokyo or N. Virginia.
You turn them on per Region. Once on, they store the full text of prompts and responses. Decide who can read the destination and how long to keep the logs before you turn them on.
According to the official documentation, calls through bedrock-mantle are currently not recorded in model invocation logs.
9. Cost and service health
These are records of charges and of AWS-side outages and maintenance. All of them have a tie to N. Virginia.
- AWS Data Exports (CUR 2.0 and others) delivers itemized charges to S3 as CSV or Parquet. Its API is only in us-east-1.
- The billing metric shows the estimated charges for the current month. It lives only in us-east-1.
- AWS Health records AWS-side outages and maintenance. Global events reach only us-east-1.
For itemized charges, the original Cost and Usage Report (CUR) is now a legacy format. AWS recommends CUR 2.0 in AWS Data Exports.
Collecting logs for each purpose
You do not need to turn on every log above. Group them by what you will use them for, and they become easier to manage.
- For audits, collect CloudTrail (all Regions) and AWS Config in S3 in a dedicated log account.
- For troubleshooting, use application logs, ELB and CloudFront access logs, and RDS logs in CloudWatch Logs, with older logs in S3.
- For security investigations, collect VPC Flow Logs, Resolver query logs, WAF logs, and GuardDuty findings in Security Lake, or in S3 to query with Athena.
- For cost management, use Data Exports in S3 and the billing metric in us-east-1.
Whatever the purpose, set retention on each CloudWatch Logs log group. By default, logs never expire.
So, where is that log?
Three questions answer "Where is that log?":
- Was it turned on?
- Where was it set to go?
- Is that place in Tokyo, or in N. Virginia?
You will not notice the third one if you only look at Tokyo. When you look for IAM or CloudFront activity, Route 53 public DNS query logs, or WAF logs for CloudFront, switch the console to us-east-1.
References
CloudWatch Logs:
- CloudWatch Logs concepts: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogsConcepts.html
- CloudWatch Logs log classes: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html
- Logging from AWS services (vended logs): https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html
- Log delivery destinations table: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-destinations-table.html
Pricing:
- Amazon CloudWatch pricing: https://aws.amazon.com/cloudwatch/pricing/
- AWS CloudTrail pricing: https://aws.amazon.com/cloudtrail/pricing/
Auditing:
- CloudTrail concepts (global service events): https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html
- Finding CloudTrail log files: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/get-and-view-cloudtrail-log-files.html
- Console sign-in events: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-aws-console-sign-in-events.html
- Selecting which resources AWS Config records: https://docs.aws.amazon.com/config/latest/developerguide/select-resources.html
Security findings:
- GuardDuty foundational data sources: https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_data-sources.html
- Security Lake sources: https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html
Networking:
- VPC Flow Logs: https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html
- Route 53 Resolver query logging: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resolver-query-logs.html
- Route 53 public DNS query logging: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html
- Global Accelerator flow logs: https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html
Front doors and the edge:
- ALB access logs: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html
- CloudFront standard logging (v2): https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/standard-logging.html
- AWS WAF logging to CloudWatch Logs: https://docs.aws.amazon.com/waf/latest/developerguide/logging-cw-logs.html
Applications and data:
- Lambda log formats: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs-logformat.html
- EKS control plane logs: https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html
- Choosing S3 logging: https://docs.aws.amazon.com/AmazonS3/latest/userguide/logging-with-S3.html
- Publishing RDS logs to CloudWatch Logs: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.Procedural.UploadtoCloudWatch.html
AI, cost, and health:
- Bedrock model invocation logging: https://docs.aws.amazon.com/bedrock/latest/userguide/model-invocation-logging.html
- AWS Data Exports: https://docs.aws.amazon.com/cur/latest/userguide/what-is-data-exports.html
- Creating a billing alarm: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html
- AWS Health Regions: https://docs.aws.amazon.com/health/latest/ug/choosing-a-region.html
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.
