Tracking the Last Download Time of a Blob in Azure Storage

KindCompute-6524 95 Reputation points
2024-07-22T07:04:21.88+00:00

Is it possible to track when a blob was last downloaded? I need to monitor the usage and access patterns of my stored data in Azure Blob Storage. Knowing the last download time would help in understanding which data is being accessed frequently and which data might be obsolete. Is there a built-in feature in Azure Storage that allows for tracking the last download time of a blob, or is there an alternative method or workaround to achieve this? Any guidance or suggestions on how to implement this tracking would be greatly appreciated.

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,216 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,915 questions
{count} votes

Accepted answer
  1. Amrinder Singh 5,155 Reputation points Microsoft Employee
    2024-07-22T10:02:30.87+00:00

    Hi KindCompute-6524 - Thanks for reaching out over Q&A forum

    You can tend to enable last access time tracking which can help you tracking the last access time of the blob. This however is only a workaround to some extent.

    When last access time tracking is enabled, the blob property called LastAccessTime is updated when a blob is read or written. A Get Blob operation is considered an access operation. Get Blob Properties, Get Blob Metadata, and Get Blob Tags aren't access operations, and therefore don't update the last access time.

    https://learn.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-policy-configure?tabs=azure-portal#optionally-enable-access-time-tracking

    Additionally, to minimize the effect on read access latency, only the first read of the last 24 hours updates the last access time. Subsequent reads in the same 24-hour period don't update the last access time. If a blob is modified between reads, the last access time is the more recent of the two values.

    Lastly, you can tend to enable monitoring that shall help in gaining insights to all the operations happening across all the blobs on the data plane.

    https://learn.microsoft.com/en-us/azure/storage/blobs/monitor-blob-storage?tabs=azure-portal

    Hope that helps!

    Please let me know if there are any further queries/concerns, will be glad to assist.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Nehruji R 8,066 Reputation points Microsoft Vendor
    2024-07-23T08:59:30.57+00:00

    Hello KindCompute-6524,

    Greetings! Welcome to Microsoft Q&A Platform.

    Yes, it is possible to track the last access time of a blob in Azure Blob Storage. Azure provides a feature called Last Access Time Tracking which allows you to monitor when a blob was last accessed. This feature can be very useful for understanding usage patterns and managing data lifecycle.

    reference - https://azure.microsoft.com/en-us/updates/azure-blob-storage-last-access-time-tracking-now-generally-available/

    Similar thread for reference - https://stackoverflow.com/questions/77987924/azure-storage-track-last-access-time-for-files

    Once enabled, you can use Azure Monitor and Storage Insights to track and analyze the access patterns of your blobs. This can help you identify frequently accessed data and potentially obsolete data.

    Use Lifecycle Management to integrate last access time tracking with Azure Blob Storage lifecycle management to automate actions like tiering or deleting blobs based on their last access time.

    Hope this information helps! please let us know if you have any further queries. I’m happy to assist you further.


    Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.