2026-06-01) or timestamps (2026-06-01T15:04:05Z). Dates begin at midnight UTC.
The
kernel audit-logs export group follows the current CLI implementation. Install a CLI release that includes this command group; availability depends on the release you have installed.kernel audit-logs search
Search audit logs within a time window. Results are ordered newest first.
--limit controls the total number of CLI results. The CLI automatically requests API pages of up to 100 records until it reaches that limit or runs out of results.Include GET requests
By default, the CLI returns matching requests for every HTTP method except GET.--include-get removes that default exclusion. --method selects exactly one method, so --method GET returns only GET requests.
kernel audit-logs download
Download matching audit logs in a time window as one gzip-compressed JSONL file.
--start and --end are required. The start is inclusive and the end is exclusive, and the time window can cover up to 30 days.
For example,
--start 2026-06-01 --end 2026-07-01 covers all of June in UTC.
Download behavior
The CLI downloads up to 50,000 records per batch, verifies each batch’s SHA-256 checksum, and automatically retries transient failures. The requested output appears only after the full download succeeds. Failed downloads are removed, though a completed download may remain at<output>.partial if it can’t be moved to the requested path.
Downloads don’t resume: rerunning the command starts over. Existing files are replaced only when you pass --force.
kernel audit-logs export
Manage S3 destinations that receive a continuous export of your organization’s audit logs. The group is also available as kernel audit-logs exports and kernel audit-logs export-destinations.
Objects use the layout <prefix>/destination_id=<destination>/org_id=<org>/date=<YYYY-MM-DD>/hour=<HH>/<window>-<chunk>.jsonl.gz. Delivery is at-least-once.
Create a destination paused, configure the IAM trust and permissions, run test, and then run resume. The create response includes the kernel_role_arn and external_id values needed for the trust policy. The destination must use an organization-level credential; project-scoped API keys are refused.
kernel audit-logs export create
Create an S3 audit log export destination. The destination is created paused.
--kms-key-id when the destination should use SSE-KMS. The command always creates the destination with the s3 type and jsonl.gz format.
The human-readable output prints the destination details and the activation steps. Use JSON output when a script needs to capture
id, kernel_role_arn, and external_id.
kernel audit-logs export list
List audit log export destinations. Human-readable output includes the destination ID, bucket, prefix, region, status, last success, failure count, and last error.
kernel audit-logs export get <id>
Get details for one audit log export destination.
Without
--output json, the command prints configuration, status, and delivery health fields such as last_exported_cursor, last_success_at, last_error, last_error_at, consecutive_failures, and next_attempt_at.
kernel audit-logs export update <id>
Update one or more destination fields. Pass at least one update flag. The API validates the merged destination configuration, so a KMS key ARN must match the destination region.
A successful update prints the updated destination. A
409 Conflict means the destination changed concurrently; retrieve fresh state and retry with the intended fields.
kernel audit-logs export pause <id>
Pause a destination so new delivery attempts stop.
An S3 upload already in progress may still complete after the pause. Events recorded while paused are not exported.
kernel audit-logs export resume <id>
Resume a destination. Delivery starts from the time of the resume; events recorded while paused are not exported.
Use
resume only after the destination’s trust policy and permissions are configured and test succeeds.
kernel audit-logs export delete <id>
Delete a destination and stop new delivery attempts.
kernel audit-logs export test <id>
Test a destination by assuming its role and writing a temporary probe object. The command exits non-zero when the test fails.
The result has
success and stage fields. The stages are assume_role, put_object, and complete; customer-fixable failures use assume_role_failed or put_object_failed. A successful test reaches complete. The probe is deleted after the write when the role has s3:DeleteObject; grant that permission so test objects are cleaned up.
Activation sequence
Use this sequence for every new destination:- Run
create. Save the returned destination ID,kernel_role_arn, andexternal_id. - Update the customer role’s trust policy to allow the returned Kernel role ARN with the returned
sts:ExternalId. - Grant
s3:PutObjectand, preferably,s3:DeleteObjecton the configured prefix. If KMS is configured, grantkms:GenerateDataKeyand key-policy access. - Run
test <id>and fix anyassume_roleorput_objectfailure. - Run
resume <id>to start delivery from that point. There is no backfill.
list, get, and delete remain available for cleanup, while delivery stops and create, update, and test require Enterprise.
Aliases
You can also usekernel audit-log, kernel auditlogs, or kernel auditlog.