Expire Data Based on Age in Azure Blob Storage
Pluralsight Hands-On Lab — Storage
At a Glance
| Platform | Pluralsight |
| Category | Azure Storage |
| Lab Type | Guided + Challenge Mode |
| Environment | Azure Portal |
| Completed | 2026 |
Overview
Azure Blob Storage Lifecycle Management policies automate data retention by deleting or tiering blobs based on age, eliminating manual cleanup and reducing storage costs. In this lab, I acted as a web admin for an online shopping site anticipating a seasonal holiday promotion. I uploaded holiday product images to a blob container, then configured a lifecycle management policy scoped to the specific upload folder to automatically delete the images after 30 days — ensuring storage costs are controlled once the promotion ends without any manual intervention.
What I Did
- Downloaded a set of holiday product images from a GitHub repository and uploaded them to a new blob container (holidaysale) in the pre-provisioned storage account, placing them in an img subfolder using the Upload to folder option
- Navigated to Lifecycle Management in the storage account and created a new rule named "30days"
- Configured the rule scope to limit blobs with filters, targeting Block blobs and Base blobs only
- Set the condition to delete the blob when last modified more than 30 days ago
- Applied a prefix filter of holidaysale/img/ to scope the rule exclusively to the holiday images folder, leaving other containers and paths unaffected
- Reviewed the saved rule to confirm the policy was correctly configured and would automatically delete blobs in the target path after 30 days
← Back to Pluralsight Labs