Cloudflare Docs
R2
Edit this page
Report an issue with this page
Log into the Cloudflare dashboard
Set theme to dark (⇧+D)

Audit Logs

Audit logs provide a comprehensive summary of changes made within your Cloudflare account, including those made to R2 buckets. This functionality is available on all plan types, free of charge, and is enabled by default.

​​ Viewing audit logs

To view audit logs for your R2 buckets:

  1. Log in to the Cloudflare dashboard and select your account.
  2. Go to Manage Account > Audit Log.

For more information on how to access and use audit logs, refer to Review audit logs.

​​ Logged operations

The following configuration actions are logged:

OperationDescription
CreateBucketCreation of a new bucket.
DeleteBucketDeletion of an existing bucket.
AddCustomDomainAddition of a custom domain to a bucket.
RemoveCustomDomainRemoval of a custom domain from a bucket.
ChangeBucketVisibilityChange to the managed public access (r2.dev) settings of a bucket.
PutBucketStorageClassChange to the default storage class of a bucket.
PutBucketLifecycleConfigurationChange to the object lifecycle configuration of a bucket.
DeleteBucketLifecycleConfigurationDeletion of the object lifecycle configuration for a bucket.
PutBucketCorsChange to the CORS configuration for a bucket.
DeleteBucketCorsDeletion of the CORS configuration for a bucket.

​​ Example log entry

Below is an example of an audit log entry showing the creation of a new bucket:

{
"action": { "info": "CreateBucket", "result": true, "type": "create" },
"actor": {
"email": "<ACTOR_EMAIL>",
"id": "3f7b730e625b975bc1231234cfbec091",
"ip": "fe32:43ed:12b5:526::1d2:13",
"type": "user"
},
"id": "5eaeb6be-1234-406a-87ab-1971adc1234c",
"interface": "API",
"metadata": { "zone_name": "r2.cloudflarestorage.com" },
"newValue": "",
"newValueJson": {},
"oldValue": "",
"oldValueJson": {},
"owner": { "id": "1234d848c0b9e484dfc37ec392b5fa8a" },
"resource": { "id": "my-bucket", "type": "r2.bucket" },
"when": "2024-07-15T16:32:52.412Z"
}