Question

Difficulty: Very hardImplement Azure Blob Storage Lifecycle Management and Retention Policies

You are implementing a data retention solution for a high-throughput microservices logging platform that writes log blobs to an Azure Storage account named telemetrydata. The account is provisioned as a Premium Block Blobs storage account. You need to configure a lifecycle management policy to automate the following requirements:
- Automatically delete block blobs 14 days after modification if they have a blob index tag named Environment set to Staging.
- Automatically transition block blobs to the Cool tier 30 days after modification if they have a blob index tag named Environment set to Production, and delete them after 90 days.

Which of the following actions should you take to achieve these requirements?

  1. Change the storage account type to Standard General Purpose v2 (GPv2), and then deploy a lifecycle policy that filters blobs using blobIndexMatch for the Environment tag, applying delete to the staging blobs and both tierToCool and delete to the production blobs.Answer
  2. B
    Deploy the lifecycle policy directly to the Premium Block Blobs account, and filter the blobs using a metadataMatch rule that targets the case-sensitive x-ms-meta-Environment metadata header.
  3. C
    Deploy the lifecycle policy directly to the Premium Block Blobs account, and include a leaseState filter set to available under the policy filters block to prevent execution conflicts on leased blobs.
  4. D
    Change the storage account type to Standard General Purpose v2 (GPv2), and deploy a lifecycle policy that includes a security block containing a Shared Access Signature (SAS) token configured with write and delete permissions.

Answer

Change the storage account type to Standard General Purpose v2 (GPv2), and then deploy a lifecycle policy that filters blobs using blobIndexMatch for the Environment tag, applying delete to the staging blobs and both tierToCool and delete to the production blobs.
To support the tiering action (moving production blobs to the Cool tier), the storage account must be of a type that supports access tiers, such as Standard General Purpose v2 (GPv2). Premium Block Blobs storage accounts only support the delete action in lifecycle policies. Furthermore, blob index tags are filtered using the blobIndexMatch property in the policy rule filters.

Step-by-Step Solution

1
Evaluate the storage account type capabilities.
Premium Block Blobs storage accounts do not support tiering to Cool or Archive; they only support the delete action in lifecycle management.
Since the production logs must transition to the Cool tier, the account type must be converted or upgraded to Standard General Purpose v2 (GPv2).
2
Select the correct JSON policy filter for blob tags.
Use blobIndexMatch in the filters block to match the key-value tag Environment with values Staging and Production.
Lifecycle management policies do not support standard metadata headers (like x-ms-meta-) for filtering, but do support blob index tags.
3
Formulate the lifecycle rule actions.
Create a rule applying delete with daysAfterModificationGreaterThan set to 14 for staging logs, and another rule applying both tierToCool (30 days) and delete (90 days) for production logs.
Standard GPv2 supports multiple rules containing different combinations of tierToCool, tierToArchive, and delete actions.
4
Verify execution and authorization requirements.
Deploy the policy natively on the storage account without including custom SAS tokens or lease-handling properties.
Lifecycle management runs natively as a platform service and automatically retries on leased blobs, requiring no extra credential configuration.

Key Concept

Azure Blob Storage Lifecycle Management policy execution, account type support, and tag-based filtering.
Rate this question