Access logs
Record every request made to a bucket into a log bucket you own, and read the records in the dashboard.
Access logging is available in the Mumbai (bom01) region only. Buckets in Indore don't show the Access Logs section.
Access logging records every request made to a bucket: uploads, downloads, deletes, listings and settings changes, including denied attempts, from any tool or user. Zata writes the records as plain-text files into another bucket that you own in the same region.
In these docs, the bucket whose requests are recorded is the source bucket. The bucket that receives the log files is the log bucket.
What you get
- A record per request: who made it, when, from which IP address, which file, what was done, and the result.
- Log files in your own bucket: plain text, one request per line, in the same layout as Amazon S3 server access logs. Any tool that reads S3 access logs can read them. See Raw log format.
- A log viewer in the dashboard: browse a day's records, search and filter them, and open the details of each request. See Read the logs.
Only the account owner can set up access logging. Sub-users don't see the Access Logs section.
Turn on access logging
- Dashboard
- aws-cli
Go to Buckets, select the gear icon (Bucket Settings) of the source bucket and expand Access Logs. Select Enable logging.
Under Log bucket, choose one:
- Existing bucket: pick one of your other buckets in this region.
- New bucket: type a name for a bucket the dashboard creates for you. The name starts as
<bucket>-logs, for examplemy-bucket-logs.
If you have no other bucket in this region, the form starts on New bucket. The log bucket must follow the rules for the log bucket.
- Folder: the folder in the log bucket where the files go. It starts as
logs/<bucket>/, for examplelogs/my-bucket/. Keep one folder per source bucket if several buckets share one log bucket. Leave it empty to put the files at the top of the log bucket. - Delivery interval: how often the current log file is closed and delivered. Choose Every 5 minutes (recommended), Every 15 minutes or Every hour. A shorter interval gives fresher logs but more, smaller files.
The line under the fields shows where the files will go, for example my-bucket-logs/logs/my-bucket/ every 5 minutes.
Select Enable logging. The window Enable Access Logging shows the source bucket and the log bucket. Select Enable Logging.
The section then shows Enabled with the status Active, and three tiles: Log location (with an Open folder link), Delivery and Delivery permission. To change the log bucket, the folder or the interval later, select Change settings, make your changes and select Save changes.
Use the AWS CLI with the account owner's access key for Mumbai, and the Mumbai endpoint https://bom01.zata.ai (see Endpoints and regions). In the examples, my-bucket is the source bucket and my-bucket-logs is the log bucket.
Skip this step if you already have a bucket to use. It must follow the rules for the log bucket.
aws s3 mb s3://my-bucket-logs --profile zata --endpoint-url https://bom01.zata.ai
The storage accepts the logging setup only if the log bucket's bucket policy lets the logging service, logging.s3.amazonaws.com, write into it. Without it, the next step fails with a 403 error.
Save this policy as log-bucket-policy.json. Change the bucket names and the folder (logs/my-bucket/) to yours:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "S3ServerAccessLogsPolicy",
"Effect": "Allow",
"Principal": { "Service": "logging.s3.amazonaws.com" },
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::my-bucket-logs/logs/my-bucket/*",
"Condition": {
"ArnEquals": { "aws:SourceArn": "arn:aws:s3:::my-bucket" }
}
}
]
}
aws s3api put-bucket-policy --bucket my-bucket-logs \
--policy file://log-bucket-policy.json \
--profile zata --endpoint-url https://bom01.zata.ai
put-bucket-policy replaces the bucket's whole policy. If the log bucket already has a policy, add the statement to it instead of replacing it.
Save this as logging.json:
{
"LoggingEnabled": {
"TargetBucket": "my-bucket-logs",
"TargetPrefix": "logs/my-bucket/"
}
}
aws s3api put-bucket-logging --bucket my-bucket \
--bucket-logging-status file://logging.json \
--profile zata --endpoint-url https://bom01.zata.ai
aws s3api get-bucket-logging --bucket my-bucket --profile zata --endpoint-url https://bom01.zata.ai
The answer shows the log bucket and the folder. The source bucket's Access Logs section in the dashboard shows the same setup.
Within about 15 minutes, Zata finds the new setup and adds a statement to the log bucket's bucket policy that blocks deleting the bucket. Your own statements are not changed, and you get a notification. Until then, the log bucket can still be deleted with an S3 tool, so don't delete it. If you later replace the policy and drop that statement, Zata adds it back.
aws-cli has no option for the delivery interval. To choose one, use Change settings in the dashboard.
Rules for the log bucket and the folder
The log bucket:
- must already exist (or be created in the form), be in the same region as the source bucket, and belong to your account;
- must be a different bucket from the source bucket: a bucket can't record its own logs into itself;
- must not have access logging turned on itself. In the same way, a bucket that receives logs can't turn on its own logging;
- must be private: not public through a bucket policy or its ACL;
- must not be shared with a sub-user or another account. If its ACL gives access to another account, logging is turned on but you see a warning: that account can see the names of the log files and, with write access, delete them. Remove the ACL grant if this is not intended.
Several source buckets can use the same log bucket. Give each its own folder.
The folder:
- is up to 256 characters;
- may contain only letters, numbers, dots (
.), dashes (-), underscores (_) and slashes (/); - must not start with a slash, contain two slashes in a row (
//), or contain.or..as a folder name.
When you turn logging on, Zata adds a statement to the log bucket's bucket policy. It lets the logging service write the log files and blocks deleting the bucket with S3 tools. Keep it: without it, no records are delivered. See What a log bucket can't do.
When records arrive
Records are not written one by one. Zata collects them in a log file and delivers the file at the end of each delivery interval, so the newest records are a few minutes late. Log files are named after the time (UTC) they were started, for example logs/my-bucket/2026-11-25-10-05-00-….
To deliver the records collected so far without waiting, select Sync latest in the log viewer. The viewer shows Latest records delivered, refreshing…, or Nothing new to deliver if there was nothing to deliver. You can sync once every 10 seconds per bucket.
Read the logs
In the source bucket's Access Logs section, select View access logs. Only the account owner can open the viewer.
- Day: use the date picker or the arrows to pick a day. Days follow UTC, the way log files are named. Times in the table are shown in your local time.
- Search: type in Search logs... to search the records.
- Filters:
- action: All actions, Uploads, Downloads, Deletes, Lists & checks, Settings or Other;
- result: Any result, Succeeded, Denied, Not found or Errors;
- user: Everyone, or one of the users found in the records. No login (public) means requests without a login, such as public links.
- Refresh reloads the records. Sync latest delivers the newest records first. See When records arrive.
The table lists the newest records first, with the columns Time, Who, Action, Result, Size and From. Select a record to see its details: Date & time, Action, Result, IP address, Tool, Access (Signed request, Shared link or No login), Processing time, the file, its size and version, Referer, Request, User agent and Request ID. Next loads older records of the day.
When several source buckets share a folder, the viewer shows only the records of this bucket.
Download the raw files
Under the table, open Raw log files for this day and select Download next to a file. Raw files are exactly what the storage wrote. Unlike the viewer, they are not cleaned up: see Security.
Raw log format
A log file has one request per line. The line follows the Amazon S3 server access log format: 26 fields in a fixed order, separated by spaces, with - for an empty field.
owner bucket [time] ip requester request-id OPERATION key "METHOD request-uri HTTP/1.1" status error-code bytes-sent object-size total-time turnaround-time referer "user-agent" version-id host-id signature-version cipher-suite authentication-type host-header tls-version access-point-arn acl-required
| # | Field | On Zata |
|---|---|---|
| 1 | Bucket owner | Your account's internal user id |
| 2 | Bucket | The source bucket |
| 3 | Time | [dd/Mon/yyyy:HH:MM:SS +0000], in UTC |
| 4 | Remote IP | The client's IP address |
| 5 | Requester | The internal user id of whoever made the request, or - |
| 6 | Request ID | |
| 7 | Operation | For example REST.PUT.OBJECT |
| 8 | Key | The file name |
| 9 | Request-URI | For example "PUT /my-bucket/photo.jpg HTTP/1.1" |
| 10 | HTTP status | |
| 11 | Error code | |
| 12 | Bytes sent | |
| 13 | Object size | |
| 14 | Total time | Always - |
| 15 | Turn-around time | For example 64ms |
| 16 | Referer | |
| 17 | User-Agent | |
| 18 | Version ID | |
| 19 | Host ID | |
| 20 | Signature version | |
| 21 | Cipher suite | |
| 22 | Authentication type | AuthHeader, QueryString or - |
| 23 | Host header | |
| 24 | TLS version | |
| 25 | Access point ARN | Always - |
| 26 | ACL required | Yes or - |
Zata writes the key, the Referer and the User-Agent exactly as the client sent them, without escaping. A key with spaces or quotes appears as is, and a key with a line break splits its record over two lines. Keep this in mind if you parse the files with your own tools.
What a log bucket can't do
A log bucket holds records of everyone's activity, so Zata keeps it closed:
- It can't be made public. Public access, a public bucket policy, a public bucket ACL and public file ACLs (Make files public) are refused.
- It can't be shared with a sub-user or another account, through access rules, inline rules, the bucket policy or the ACL.
- Existing access can only be narrowed. Access that was given before the bucket became a log bucket stays until you remove it. You can remove actions from it, but not add actions or change who or what it covers.
- It can't be deleted with S3 tools while it receives logs.
aws s3 rb, rclone and other S3 tools get a 403 error. Delete it from the dashboard instead: see Delete a log bucket.
These checks apply to the Zata dashboard. If a log bucket is opened to others with an S3 tool, you get the notification Access logs are stored in a bucket other people can read (see Notifications).
To do any of these, first turn logging off for every source bucket that logs into it, or move their logs to another log bucket.
Delete a log bucket only from the dashboard. If the protecting statement is removed from its bucket policy and the bucket is deleted with an S3 tool, the bucket name becomes free. Whoever next creates a bucket with that name can receive your new log records until Zata switches logging off, usually within a minute.
Delete a log bucket
Delete a log bucket the usual way: see Delete a bucket. The delete window then shows This bucket stores access logs and the source buckets that log into it.
- Tick I understand these logs will be lost. All log files in the bucket are deleted for good.
- Confirm the delete as usual.
Before the bucket is deleted, Zata turns off access logging for every source bucket that logs into it. Their requests are no longer recorded. To record them again, turn logging on with another log bucket. If the delete fails, their logging is turned back on as it was.
Turning logging off can deliver the last log records into the bucket. A bucket that was empty may then no longer be empty, and the delete stops. Delete it again with Delete All Contents.
Turn off access logging
- Dashboard
- aws-cli
In the source bucket's Access Logs section, select Disable. The window Disable access logging? opens. Select Disable to confirm, or Keep logging.
aws s3api put-bucket-logging --bucket my-bucket --bucket-logging-status '{}' \
--profile zata --endpoint-url https://bom01.zata.ai
New requests are no longer recorded. Records collected so far are delivered. Log files already in the log bucket stay where they are: delete them yourself, or with a lifecycle rule.
When no source bucket logs into a log bucket any more, Zata removes the statements it added from the log bucket's bucket policy. For logging set up with aws-cli, this can take up to about 15 minutes, and the statement you added yourself stays.
Keep the log files under control
Zata never deletes log files. They stay in the log bucket and use its storage until you delete them. Add a lifecycle rule to the log bucket that deletes old files, for example:
| Goal | Rule on the log bucket |
|---|---|
| Keep 30 days of logs | Expire objects 30 days, Filtered subset with key prefix logs/ |
If versioning is on for the log bucket, also add Clear old versions, or the expired files keep their space. See How versioning changes what a rule does.
Security
- Raw files contain sensitive data. They hold client IP addresses, every file name, internal user ids, and the full address of each shared and upload link that was used, including its signature. Those links keep working until they expire, so anyone with a raw file can use them. The viewer hides signatures and credentials as
[redacted]; a downloaded raw file doesn't. Share raw files with care, and keep the log bucket private. - It is not an audit trail. Logging is best effort: records can be missed, and anyone who can write to the log bucket can change or delete them.
Notifications
Zata checks your access logging setups and tells you in the dashboard's notifications when something needs your attention:
| Notification | When | What to do |
|---|---|---|
| Access logging switched off | The log bucket no longer exists, or now belongs to another account. Zata switched logging off for the source bucket. | Turn logging on again with another log bucket. |
| Delete protection added to a log bucket | You set up logging with an S3 tool, and Zata added the delete-protection statement to the log bucket's bucket policy. | Nothing. To delete the log bucket, use the dashboard. |
| Access logs are not being delivered | The log bucket has access logging turned on itself, or its bucket policy no longer lets the logging service write. New records are dropped. | Turn off logging on the log bucket, or open the source bucket's Access Logs section and select Repair. |
| Access logs are stored in a bucket other people can read | The log bucket is public, or shared with a sub-user or another account. | Remove that access, or send the logs to a private bucket. |
The Access Logs section shows the same problems, with a button to fix them where possible, for example Turn off logging on…, Repair, Recreate… and resume or Choose another bucket. A log bucket that was deleted can be created again, but the log files that were in it can't be recovered.
Errors
| Message | What to do |
|---|---|
| The log bucket does not exist in this region | Choose a bucket in the source bucket's region, or create one. |
| The log bucket belongs to another account | Choose one of your own buckets. |
| The log bucket must be a different bucket | Choose a bucket other than the source bucket. |
| A bucket that receives logs cannot have access logging switched on itself | Turn off logging on the log bucket, or choose another one. |
| This bucket stores access logs for … | You are turning on logging for a log bucket. Turn off the logging of the listed buckets, or move it to another log bucket, first. |
| The log bucket is public. Make it private before using it for access logs | Make the bucket private, or choose another one. |
| The log bucket is shared with a sub-user or another account… | Remove that access, or choose another bucket. |
| The folder may only contain letters, numbers, dots, dashes, underscores and slashes. | Fix the folder. See the rules. |
| Please wait 10 seconds between syncs | Wait, then select Sync latest again. |
| The log bucket … no longer exists, so there is nothing to sync into | Recreate the log bucket or choose another one in the Access Logs section. |
| This bucket receives access logs, so it cannot be made public. | See What a log bucket can't do. |
| This bucket receives access logs, so it cannot be shared with a sub-user or another account… | See What a log bucket can't do. |
| The bucket was not deleted: access logging of … into it could not be switched off. | Try again later. |
| The bucket was not deleted: switching access logging off wrote the last log records of … into it | Delete the bucket again with Delete All Contents. |
A 403 error from aws s3api put-bucket-logging | The log bucket's bucket policy doesn't let the logging service write. Add the statement from the aws-cli steps. |
A 403 error (AccessDenied) from aws s3 rb on a log bucket | The bucket receives logs. Delete it from the dashboard. See Delete a log bucket. |