Site icon John Folberth

Changing Access Tiers for Append and Page Blobs

Changing Azure Tiers for Append and Page Blobs

Changing Azure Tiers for Append and Page Blobs

Introduction

If managing an Azure ecosystem cost optimization is a key pillar. One such activity that can assist in cost optimization is the ability to scale storage access tiers. By changing access tiers one can significantly reduce their Azure storage costs. Previously this type of activity was limited to just block blobs, unless you wanted to go through a bunch of extra steps. That was before the GA announcement providing this functionality. Now one can switch the access tiers for append and page blobs.

Background

For those unfamiliar with Azure Blob Storage there are multiple types of blobs available.

Use Case

Given these types of blobs a general use case could involve and industry where certain data is required to be stored for a certain length of time legally. Typically this can be seen in Healthcare and Financial industries. In this scenario an Append Blob that may track and store log activity could make a lot of sense.

Years of data stored in an Append Blob data access tier can add up quickly. So now with this functionally we have the ability to change the access tier of the Append Blob to something like archive which is a fraction of the cost with the trade off being it is available in up to 15 hours as opposed to almost instantaneous.

Process

At this stage I feel like it is appropriate to illustrate that this feature does not technical change the access tier of the Append/Page Blob. Rather it provides the capabilities to easily copy an existing Append/Page Blob to a new Block Blob with the desired storage tier. This feels like a bit of a misnomer; however, at this stage this is the easiest way to accomplish this.


$ctx = New-AzStorageContext -StorageAccountName <insert-storageAccountName> 

$containerName = 'appendblob'
$srcblobName = 'appendBlobTest.txt'
$destcontainerName = 'blockblob'
$destblobName = 'blockBlobTest.txt'
$destTier = 'archive'

Copy-AzStorageBlob -SrcContainer $containerName -SrcBlob $srcblobName -Context $ctx -DestContainer $destcontainerName -DestBlob $destblobName -DestContext $ctx -DestBlobType Block -StandardBlobTier $destTier

Full documentation on the Copy-AzStorageBlob module. As of the time of this writing this function can only be performed via PowerShell, Azure CLI, or AzCopy.

Conclusion

There you have it! A little misleading; however, the functionality on changing an Append/Page Blob to a different access tier is available. This feature will assist those who are attempting to keep a well cost Optimized Azure Environment. If cost optimization is something of interest to you I’d encourage you to check out some of my other posts on Azure Cost Management.

Exit mobile version