You can track or monitor lifecycle policy functioning using bucket logs.
Logging must be enabled on the bucket prior to lifecycle monitoring. For instructions, refer to Logging: Enabling/Disabling for a Bucket. (Ensure the target logging bucket is different from the source bucket to avoid creating a logging loop.)
Once logging is enabled, Wasabi recommends that you allow at least 24 hours for lifecycle actions to execute and record in the bucket log files.
Reviewing Lifecycle Actions
Wasabi lifecycle policies trigger specific REST API operations when objects meet the criteria defined in the lifecycle rules. These operations are recorded in the bucket log files and can be used to verify execution of lifecycle actions. The logged behavior varies depending on whether the bucket has versioning or immutability enabled.
Lifecycle Actions in Buckets Without Versioning or Immutability
For buckets without versioning or object lock enabled, lifecycle policies result in single-step object deletion. The associated log entries will include the following operation:
S3.EXPIRE.OBJECT indicates that an object was deleted due to lifecycle policy expiration.
Example Log Format
Each log entry follows this structure:
Record format: [BucketOwner Bucket Time RemoteIP Requester RequestId Operation Key Request-URI HttpStatus ErrorCode BytesSent ObjectSize TotalTime Turn-AroundTime Referrer User-Agent VersionId]
=========================================================================================================================================================
AFA702658F7A23D02748BB10A9EB2EAAD4A3842C42FF145B7E87FB17D2C012FB lifecycle-lab-bucket [23/Jan/2025:04:23:18 +0000] - WasabiS3 WEDETVQRNKXIHJMQ S3.EXPIRE.OBJECT Screen+Shot+2022-02-01+at+4.58.48+PM.png "-" - - - 48393 - - "-" "-" null
AFA702658F7A23D02748BB10A9EB2EAAD4A3842C42FF145B7E87FB17D2C012FB lifecycle-lab-bucket [23/Jan/2025:04:23:18 +0000] - WasabiS3 6GMSIZQR7F8AZM30 S3.EXPIRE.OBJECT Screen+Shot+2022-02-02+at+12.02.52+PM.png "-" - - - 1024286 - - "-" "-" null
AFA702658F7A23D02748BB10A9EB2EAAD4A3842C42FF145B7E87FB17D2C012FB lifecycle-lab-bucket [23/Jan/2025:04:23:18 +0000] - WasabiS3 WZEP92BF5ILONFNY S3.EXPIRE.OBJECT Screen+Shot+2022-02-03+at+11.08.15+AM.png "-" - - - 44069 - - "-" "-" null
These entries confirm that the listed objects were removed by the configured lifecycle policy.
Lifecycle Actions in Buckets With Versioning or Immutability
For buckets with versioning enabled or immutability policies applied, lifecycle processing involves two phases:
A delete marker is created on the current object version.
The non-current versions of the object are deleted according to the lifecycle rule.
REST API Operations Logged
S3.CREATE.DELETEMARKER indicates that a delete marker was added to an object.
S3.EXPIRE.OBJECT indicates that a non-current version was deleted due to lifecycle expiration.
This two-step process is necessary to permanently remove versioned data and reduce storage usage. For details, refer to Deleting Object Versions From a Versioning-Enabled Bucket.
Example Log Snippet
Record format: [BucketOwner Bucket Time RemoteIP Requester RequestId Operation Key Request-URI HttpStatus ErrorCode BytesSent ObjectSize TotalTime Turn-AroundTime Referrer User-Agent VersionId]
=========================================================================================================================================================
AFA702658F7A23D02748BB10A9EB2EAAD4A3842C42FF145B7E87FB17D2C012FB life-cycle-verification [22/Jan/2025:01:47:20 +0000] - WasabiS3 QGCYSLMWNDMHENV4 S3.CREATE.DELETEMARKER Logs%2F-2025-01-20-08-02-16-TOFLH2A9UP8ZKDGT "-" - - - 1126 - - "-" "-" -
AFA702658F7A23D02748BB10A9EB2EAAD4A3842C42FF145B7E87FB17D2C012FB life-cycle-verification [22/Jan/2025:01:47:21 +0000] - WasabiS3 IDF6CZYQ9VEGITZK S3.EXPIRE.OBJECT Logs%2F-2025-01-18-01-41-24-W45H34FWLJ2MOXNR "-" - - - 1126 - - "-" "-" 001737164814527819637-uj3WTJvG4n
AFA702658F7A23D02748BB10A9EB2EAAD4A3842C42FF145B7E87FB17D2C012FB life-cycle-verification [22/Jan/2025:01:47:21 +0000] - WasabiS3 BTUERC9UXJDA4M0Z S3.EXPIRE.OBJECT Logs%2F-2025-01-17-01-39-05-0GWT90WYJ6PDRHTO "-" - - - 0 - - "-" "-" 001737250872798946429-b6LQSBOoZL
AFA702658F7A23D02748BB10A9EB2EAAD4A3842C42FF145B7E87FB17D2C012FB life-cycle-verification [23/Jan/2025:01:45:38 +0000] - WasabiS3 AZDJ04V4TRELPEAY S3.CREATE.DELETEMARKER 1efc302a-82c5-4693-83ad-7db05bfff329.png "-" - - - 149276 - - "-" "-" -
AFA702658F7A23D02748BB10A9EB2EAAD4A3842C42FF145B7E87FB17D2C012FB life-cycle-verification [23/Jan/2025:01:45:38 +0000] - WasabiS3 P47J7AAC985P4WZZ S3.CREATE.DELETEMARKER Logs%2F-2025-01-21-23-08-24-ZJJRDVIEG8OPX3CT "-" - - - 56425 - - "-" "-" -
AFA702658F7A23D02748BB10A9EB2EAAD4A3842C42FF145B7E87FB17D2C012FB life-cycle-verification [23/Jan/2025:01:45:38 +0000] - WasabiS3 46NE3VDTCF3NNE8U S3.CREATE.DELETEMARKER Mail+-+Gowtham+Kamireddi+-+Outlook.pdf "-" - - - 278012 - - "-" "-" -
AFA702658F7A23D02748BB10A9EB2EAAD4A3842C42FF145B7E87FB17D2C012FB life-cycle-verification [23/Jan/2025:01:45:39 +0000] - WasabiS3 HWJUKLHNOTA9SC3I S3.CREATE.DELETEMARKER Oura+Ring+Checkout+Summary.pdf "-" - - - 758300 - - "-" "-" -
AFA702658F7A23D02748BB10A9EB2EAAD4A3842C42FF145B7E87FB17D2C012FB life-cycle-verification [23/Jan/2025:01:45:39 +0000] - WasabiS3 MUJ41AFC5BTFBH6D S3.CREATE.DELETEMARKER Pankaj.png "-" - - - 267836 - - "-" "-" -
Reviewing Bucket Logs
You can review bucket logs without specialized tools or database queries. You can run the following commands directly on the log files to count lifecycle-related operations.
macOS Commands
To count the number of S3.EXPIRE.OBJECT operations:
grep -roi "S3.EXPIRE.OBJECT" . | wc -l
To count the number of S3.CREATE.DELETEMARKER operations:
grep -roi "S3.CREATE.DELETEMARKER" . | wc -l
Windows Commands
To count the number of S3.EXPIRE.OBJECT operations:
findstr /s /i "S3.EXPIRE.OBJECT" . | find /c /v ""
To count the number of S3.CREATE.DELETEMARKER operations:
findstr /s /i "S3.CREATE.DELETEMARKER" . | find /c /v ""
Example