CodexBloom - Programming Q&A Platform

Azure Blob Storage Lifecycle Management Policy Not Transitioning to Cool Storage as Expected

πŸ‘€ Views: 603 πŸ’¬ Answers: 1 πŸ“… Created: 2025-06-11
azure blob-storage lifecycle-management json

I've searched everywhere and can't find a clear answer. I'm working on a personal project and I'm working on a project and hit a roadblock. I have set up a lifecycle management policy in Azure Blob Storage to automatically transition blobs older than 30 days to the Cool storage tier. However, after more than 30 days, the blobs are still in the Hot storage tier, and I don't see any indication of the transition occurring. Here’s the policy I configured: ```json { "rules": [ { "name": "transition-to-cool", "filters": { "blobTypes": ["blockBlob"], "minModificationTime": "@{addDays(utcNow(), -30)}" }, "actions": { "baseBlob": { "tierToCool": {} } } } ] } ``` I double-checked that the policy is correctly applied to the storage account and that the blobs I’m testing with were last modified over 30 days ago. I also verified that the blobs are indeed block blobs and that there are no conflicting lifecycle rules. I ran the following command to ensure the lifecycle policy is enabled: ```bash az storage account management-policy show --account-name <your_account_name> ``` The output shows that my policy is in place. However, I noticed that the `minModificationTime` filter uses UTC time, and I’m not sure if that could be causing issues. Could the UTC time offset affect the lifecycle transition? Is there a way to troubleshoot this further? Any insights would be appreciated! What am I doing wrong? Has anyone else encountered this? I'm coming from a different tech stack and learning Json. Could someone point me to the right documentation?