Search code examples
azureazure-functionsazure-blob-storageazure-storage

Azure Blob:- How to automate Azure Archive Storage to Cool/Hot tier conversion, send download link once it's avaible , and re-archive after 72 hours?


I'm using Azure Archive Storage in blob-storage for cost-effective data storage. I need to automate the process where:

When a user requests access to a file, the file needs to be converted from the Archive tier to the Cool or Hot tier. Once the file is available for download (conversion can take 5-12 hours), an email should be sent to the user with a download link. After 72 hours of availability, the file should automatically be moved back to the Archive tier. I'm looking for an efficient and cost-effective solution using Azure services to manage this workflow. How can I achieve this with minimal manual intervention and optimal resource usage?

Solution Requirements:

1.Detect when a file is converted from Archive to Cool/Hot tier. 2.Send a notification email with a SAS URL for the file download. 3.Automatically move the file back to the Archive tier after 72 hours.


Solution

  • Have a look at combining these services/features that will help you solve the issue at hand:

    • Azure Event Grid
      For instance the Microsoft.Storage.BlobTierChanged event is

    "Triggered when the blob access tier is changed. Specifically, when clients call the Set Blob Tier operation that is available in the Blob REST API, this event is triggered after the tier change completes."

    • Azure Functions

    We often build systems to react to a series of critical events. Whether you're building a web API, responding to database changes, processing event streams or messages, Azure Functions can be used to implement them.

    This should give you the tools necessary to implement something that solves the issue you have. In case you run into issues implementing, feel free to open a new question where you take into account how to ask a good question.